I am having an issue getting this to work for me.
Looks like I can get the taskkill to work but then my update fails after that.
It runs OK from a batch file in the following format.
@echo off
Pause
In WPP I did custom update. I added two different "Allow to execute a file".
One with what Bill_T had above which kills the running exe of greenshot:
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>c:\Windows\System32\taskkill.exe</PathToExecutable>
<Parameters>/F /IM greenshot.exe /T</Parameters>
The other to install the program:
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>C:\PackageContent\Greenshot\Greenshot-INSTALLER-1.2.8.12-RELEASE.exe</PathToExecutable>
<Parameters>/VERYSILENT /SUPPRESSMSGBOXES /NORESTART</Parameters>
<KillProcess>True</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
In the " if the update is already installed." I have it look for a registry key to see if current version already exists.
<bar:RegSz Key="HKEY_LOCAL_MACHINE" Subkey="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Greenshot_is1" Value="DisplayVersion" Comparison="EqualTo" Data="1.2.8.12"/>
In the "Allow clients computer to determine if the update is installable."
I have it make sure the machine is running windows 7 or Windows 8.1.
What am I missing?
Looks like I can get the taskkill to work but then my update fails after that.
It runs OK from a batch file in the following format.
@echo off
echo Checking file existence on %computername%
if exist "C:\Program Files\Greenshot\unins000.exe" (
echo File exist on %computername%
echo Stopping greenshot.exe on computer %%i
c:\Windows\System32\taskkill.exe /F /IM greenshot.exe /T
Pause echo Installing Greenshot on %computername%
\shared\files\Techdownload\Greenshot\Greenshot-INSTALLER-1.2.8.12-RELEASE.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-) else (
echo File does NOT exist on %computername%
)
)Pause
In WPP I did custom update. I added two different "Allow to execute a file".
One with what Bill_T had above which kills the running exe of greenshot:
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>c:\Windows\System32\taskkill.exe</PathToExecutable>
<Parameters>/F /IM greenshot.exe /T</Parameters>
The other to install the program:
<ElementType>CustomUpdateElements.ExecutableElement</ElementType>
<PathToExecutable>C:\PackageContent\Greenshot\Greenshot-INSTALLER-1.2.8.12-RELEASE.exe</PathToExecutable>
<Parameters>/VERYSILENT /SUPPRESSMSGBOXES /NORESTART</Parameters>
<KillProcess>True</KillProcess>
<TimeBeforeKilling>10</TimeBeforeKilling>
In the " if the update is already installed." I have it look for a registry key to see if current version already exists.
<bar:RegSz Key="HKEY_LOCAL_MACHINE" Subkey="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Greenshot_is1" Value="DisplayVersion" Comparison="EqualTo" Data="1.2.8.12"/>
In the "Allow clients computer to determine if the update is installable."
I have it make sure the machine is running windows 7 or Windows 8.1.
What am I missing?