We have COM Add-Ins that need to be updated, but they require that Outlook be closed before unregistering them.
TaskKill.exe ONLY works when it is called after "Apply Install" has been run. I'm still new to this software. Why is this the case?
Would I run into problems if I called "Apply Install" before having installed anything, just so I an run taskkill.exe?
Taskkill.exe is not shutting down Outlook.exe
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Taskkill.exe is not shutting down Outlook.exe
I suppose you are executing "taskkill.exe" via "Run Program" command, and "Run Program" can be invoked at any time during the script (regardless of Apply install execution).
Can you share more details on this?
Btw, you may also use "Terminate Process -command" to shutdown of a running application.
Can you share more details on this?
Btw, you may also use "Terminate Process -command" to shutdown of a running application.
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Re: Taskkill.exe is not shutting down Outlook.exe
Here is a code snippet
DOES NOT WORK HERE
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
Set Variable REMOVEOLD to
Set Variable ERROROLD to
Run Program $WINSYSDIR$\taskkill.exe /F /IM outlook.exe (WAIT, get result into variable SUCCESS)
Run Program $TARGETDIR$\adxregistrator.exe /uninstall="myAddIN.dll" (WAIT)
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
WORKS HERE
[compiler if Variable BUILDMODE Equals PATCH]
Apply Patch (get result into variable SUCCESS)
[compiler else]
if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Apply Install (get result into variable SUCCESS)
end
[compiler end]
Run Program $WINSYSDIR$\taskkill.exe /F /IM outlook.exe (WAIT, get result into variable SUCCESS)
Run Program $TARGETDIR$\adxregistrator.exe /install="myAddIn.dll" (WAIT, get result into variable InstallStatus)
if Variable OutlookVersion Equals Outlook.Application.15
DOES NOT WORK HERE
[compiler if Variable BUILDMODE not Equals PATCH]
if Variable NEEDSUPGRADE Equals TRUE
Set Variable REMOVEOLD to
Set Variable ERROROLD to
Run Program $WINSYSDIR$\taskkill.exe /F /IM outlook.exe (WAIT, get result into variable SUCCESS)
Run Program $TARGETDIR$\adxregistrator.exe /uninstall="myAddIN.dll" (WAIT)
Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
WORKS HERE
[compiler if Variable BUILDMODE Equals PATCH]
Apply Patch (get result into variable SUCCESS)
[compiler else]
if Variable ADVERTISE Equals TRUE
Apply Advertised (get result into variable SUCCESS)
else
Apply Install (get result into variable SUCCESS)
end
[compiler end]
Run Program $WINSYSDIR$\taskkill.exe /F /IM outlook.exe (WAIT, get result into variable SUCCESS)
Run Program $TARGETDIR$\adxregistrator.exe /install="myAddIn.dll" (WAIT, get result into variable InstallStatus)
if Variable OutlookVersion Equals Outlook.Application.15
Re: Taskkill.exe is not shutting down Outlook.exe
Your answer led me to the solution.
When you said that the command could be run at any time, I took a look at the code again.
I noticed the variable $WINSYSDIR$. When I removed it from the command line, it worked!
Run Program taskkill.exe /F /IM outlook.exe (WAIT, get result into variable SUCCESS)
Apparently $WINSYSDIR$ doesn't have a value, or the wrong one when it was run so early in the code. Near the end of the code, it has a value; hence $WINSYSDIR$\Taskkill.exe works at that point.
When you said that the command could be run at any time, I took a look at the code again.
I noticed the variable $WINSYSDIR$. When I removed it from the command line, it worked!
Run Program taskkill.exe /F /IM outlook.exe (WAIT, get result into variable SUCCESS)
Apparently $WINSYSDIR$ doesn't have a value, or the wrong one when it was run so early in the code. Near the end of the code, it has a value; hence $WINSYSDIR$\Taskkill.exe works at that point.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Taskkill.exe is not shutting down Outlook.exe
I think you caught the problem!
Typically, WINSYSDIR gets defined within the [Define Setup Globals] block of the script.
Obviously any attempt to use such variable prior the above assignment returns an EMPTY value.
You can just specify "taskkill.exe" (without path) with Run Program, or alternatively, you may initialize WINSYSDIR earlier in your code ...both approaches should work identically.
Typically, WINSYSDIR gets defined within the [Define Setup Globals] block of the script.
Obviously any attempt to use such variable prior the above assignment returns an EMPTY value.
You can just specify "taskkill.exe" (without path) with Run Program, or alternatively, you may initialize WINSYSDIR earlier in your code ...both approaches should work identically.
Francesco Toscano
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
InstallAware Software
White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE
Who is online
Users browsing this forum: No registered users and 118 guests