Hello
I have been asked to put together a script to uninstall an application and install another application (this will be deployed through SCCM). Pleased to report I managed to get the script
working.
Basically, the script needs to stop two processers before uninstalling the application -
Needs to temporary stop explorer (application needs to remove a folder from the user's library)
We then uninstall the application, then installs the new application
This all works (amazingly)
the issue I have is when I restart explorer.exe - I get a command prompt called explorer.exe
I have checked my Shell environment and it points to explorer (in the registry)
Same on any computer I run the script on
@echo off
setlocal
set Installpath=%~dp0
:start
tasklist|find "BoxSync.exe"
goto found
:found
taskkill /f /im BoxSync.exe
goto BoxMonitor
:BoxMonitor
tasklist|find "BoxSyncMonitor.exe"
goto found
:found
taskkill /f /im BoxSyncMonitor.exe
goto explorer
:explorer
taskkill /F /IM "explorer.exe"
MsiExec.exe /X{CD5CB679-159B-4E4C-B847-B29B492D106E} /quiet
%Installpath%BoxSyncSetup.exe /uninstall /quiet
del C:\Users\%userProfile%\Box Sync
%Box-x64.msi /quiet
start "explorer.exe"
start "BOX.exe"