Worf Posted January 31, 2008 Share Posted January 31, 2008 HiI seem to be having problems with Taskkill.exe not shutting down apps after they have installed and would like some help please.My RunOnceEx is listed below.Many ThanksWorfcmdow @ /HID@echo offSetLocal enableextensionsSET CDROM=%~d0REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V "Ruby Software" /D "%CDROM%\install\RunOnceEx.exe /verysilent" /fSET KEY="HKLM\SOFTWARE\Ruby Software\RunOnceEx"REG ADD %KEY% /V TITLE /D "Installing Applications" /fREG ADD %KEY% /V TEXT /D "Please wait while Windows installs the following applications:" /fREG ADD %KEY% /V PNG /D "$DEFAULT" /fREG ADD %KEY% /V PNG_arrow /D "$DEFAULT" /fREG ADD %KEY% /V PNG_success /D "$DEFAULT" /fREG ADD %KEY% /V FONT /D "MS Sans Serif" /f-------------------------------------------------------------------------------------------------------------------------; Install SpyWare DoctorREG ADD %KEY%\001 /VE /D "SpyWare Doctor" /fREG ADD %KEY%\001 /V 1 /D "%CDROM%\apps\sdasetup.exe /VERYSILENT /SP- /NORESTART /NOAUTOUPDATE" /fREG ADD %KEY%\001 /V 2 /D "taskkill.exe /F /IM sdasetup.exe" /f-----------------------------------------------------------------------------------------------; Install FirewallREG ADD %KEY%\002 /VE /D "Firewall" /fREG ADD %KEY%\002 /V 1 /D "%CDROM%\apps\fwinstall.exe /VERYSILENT /SP- /NORESTART" /fREG ADD %KEY%\002 /V 2 /D "taskkill.exe /F /IM fwinstall.exe" /f-----------------------------------------------------------------------------------------------; Install First Aid RegistryREG ADD %KEY%\003 /VE /D "First Aid Registery" /fREG ADD %KEY%\003 /V 1 /D "%CDROM%\apps\rfaplat.exe /VERYSILENT /SP- /NORESTART" /fREG ADD %KEY%\003 /V 2 /D "taskkill.exe /F /IM rfaplat.exe" /f-----------------------------------------------------------------------------------------------; Cleaning Up And Rebooting;REG ADD %KEY%\095 /VE /D "Cleaning Up And Rebooting" /f;REG ADD %KEY%\095 /V 1 /D "%CDROM%\CleanUP\cleanup.cmd" /fEndLocalEXIT Link to comment Share on other sites More sharing options...
Arie Posted January 31, 2008 Share Posted January 31, 2008 Having a quick look it seems like you're killing the installer tasks themselves, but by the time your kill command runs, the installer will always be done already. I believe what you would like is that once the installation process is done, if the application auto-starts straight away, you would like to kill it. This means that you need to replace those wrong installer executable names with the names of the files which start as soon as the installation process is done. An example: say you run BLAHSETUP.EXE first, currently you kill this process as a second step, but this won't do anything as the installation process will have already completed. Instead of killing BLAHSETUP.EXE, you need to kill RUNBLAH.EXE. Hope this makes it a bit clear. I'm not that good in explaining these things as to me this is all clear and I never even think about it, so explaining is somewhat difficult Link to comment Share on other sites More sharing options...
ajua Posted January 31, 2008 Share Posted January 31, 2008 you need to use a timer file because in real time, the taskill occurs but way too fast before the program's process finishes to open.search for sleep.exe in this forum. i and other people used this approach before. Link to comment Share on other sites More sharing options...
radix Posted January 31, 2008 Share Posted January 31, 2008 You need to kill the process which is start after installation (the executable file of program)The name of process can be found in Task Manager when you test your installer. Link to comment Share on other sites More sharing options...
Worf Posted February 1, 2008 Author Share Posted February 1, 2008 Thanks for your help. Link to comment Share on other sites More sharing options...
midi2k6 Posted February 1, 2008 Share Posted February 1, 2008 taskkill is stupid KILL during batch mode silent install (sometimes it hang if you have multiple apps killed by taskkill.exe) i would recommended to use third application to end task instead Taskkill.exelike pskill.exe and many others, google it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now