Jump to content

Need help RunOnceEx and Taskkill


Worf

Recommended Posts

Hi

I 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 Thanks

Worf

cmdow @ /HID

@echo off

SetLocal enableextensions

SET CDROM=%~d0

REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce /V "Ruby Software" /D "%CDROM%\install\RunOnceEx.exe /verysilent" /f

SET KEY="HKLM\SOFTWARE\Ruby Software\RunOnceEx"

REG ADD %KEY% /V TITLE /D "Installing Applications" /f

REG ADD %KEY% /V TEXT /D "Please wait while Windows installs the following applications:" /f

REG ADD %KEY% /V PNG /D "$DEFAULT" /f

REG ADD %KEY% /V PNG_arrow /D "$DEFAULT" /f

REG ADD %KEY% /V PNG_success /D "$DEFAULT" /f

REG ADD %KEY% /V FONT /D "MS Sans Serif" /f

-------------------------------------------------------------------------------------------------------------------------

; Install SpyWare Doctor

REG ADD %KEY%\001 /VE /D "SpyWare Doctor" /f

REG ADD %KEY%\001 /V 1 /D "%CDROM%\apps\sdasetup.exe /VERYSILENT /SP- /NORESTART /NOAUTOUPDATE" /f

REG ADD %KEY%\001 /V 2 /D "taskkill.exe /F /IM sdasetup.exe" /f

-----------------------------------------------------------------------------------------------

; Install Firewall

REG ADD %KEY%\002 /VE /D "Firewall" /f

REG ADD %KEY%\002 /V 1 /D "%CDROM%\apps\fwinstall.exe /VERYSILENT /SP- /NORESTART" /f

REG ADD %KEY%\002 /V 2 /D "taskkill.exe /F /IM fwinstall.exe" /f

-----------------------------------------------------------------------------------------------

; Install First Aid Registry

REG ADD %KEY%\003 /VE /D "First Aid Registery" /f

REG ADD %KEY%\003 /V 1 /D "%CDROM%\apps\rfaplat.exe /VERYSILENT /SP- /NORESTART" /f

REG 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" /f

EndLocal

EXIT

Link to comment
Share on other sites


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

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

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.exe

like pskill.exe and many others, google it.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...