June 18, 200521 yr When installing some of my programs I need taskkill to run, but it wont.Can anyone look over my commands and tell med whats wrong?REG ADD %KEY%\009 /VE /D "BulletProof FTP Server" /fREG ADD %KEY%\009 /V 1 /D "%PP%ftpsetup.exe /verysilent" /fREG ADD %KEY%\009 /V 2 /D "taskkill.exe /IM bpftpserver.exe" /fREG ADD %KEY%\009 /V 3 /D "%PP%bpftpserver.exe" /fREG ADD %KEY%\016 /VE /D "DVD Identifier" /fREG ADD %KEY%\016 /V 1 /D "%PP%DVDIdentifier3.6.3.1.exe /VERYSILENT" /fREG ADD %KEY%\016 /V 2 /D "taskkill.exe /IM "DVD Identifier.exe"" /fREG ADD %KEY%\038 /VE /D "Opera Search ini editor" /fREG ADD %KEY%\038 /V 1 /D "%PP%OperaSearchIni\opsedsetup123.exe /SILENT" /fREG ADD %KEY%\038 /V 2 /D "taskkill.exe /IM opsed.exe" /fREG ADD %KEY%\052 /VE /D "TuneXp 1.5" /fREG ADD %KEY%\052 /V 1 /D "%PP%TuneXP15.exe /VERYSILENT /SP-" /fREG ADD %KEY%\052 /V 2 /D "%PP%Sleep.exe 10" /fREG ADD %KEY%\052 /V 3 /D "taskkill.exe /IM tunexp.exe" /f
June 18, 200521 yr Try adding the /F switch to "forcefully terminate the process(es)."You could also try using PsKill or NirCMD.
June 18, 200521 yr Pretty sure usin Taskill in Runonceex like that will cause the executeable to run first then execute taskill next not really servin the purpose. I generally script it through Autoit.
June 19, 200521 yr svortevik, I don't know what your %pp% expands to, but at first glance I noticed that for the first two you might have a problem with the quotes. With RunOnceEx if you need more quotes you will need to preced them with a "\" to get them to transfer properly.So, your lineREG ADD %KEY%\016 /V 2 /D "taskkill.exe /IM "DVD Identifier.exe"" /fshould be...REG ADD %KEY%\016 /V 2 /D "taskkill.exe /IM \"DVD Identifier.exe\"" /fIf you expansion variable includes any spaces when expanded, then you'll have the same problem (I know as I learned the hard way!).Your first line has the executable being executed just after you've killed it!!!The other two I'm not too familiar with, so I can only ask why use sleep.exe and then taskill?? You might be able to wrap them in a Winrar sfx file or use 7zip for a silent install, but others here can better advise you.
Create an account or sign in to comment