Hey Team, My question to you is, what would the cmd line of a batch file look like if i wanted to run CCleaner.exe Then c:\windows\system32\cleanmgr.exe /dc /sagerun: 1 then a system restart... so shutdown -r ?? I want to tell my Autorun.inf to run this when i plug it into the pc's at my school to do some basic maintenance. Thanks
Also CCleaner.exe will have a command line switch of /AUTO I also want the program to close after it is finishedrunning.///// im not sure how to do that.. Mybe ill just let the shutdown part kill it haha
Hmm, I don't know how to make it run multiple programs simultaneously, but I think you may need to make your original .bat file open up other .bat files. I'm no expert on .bat commands but I think the command to stop a program is "taskkill /f /im ccleaner.exe". But that works only if you have xp pro (not sure about vista). For XP home you can download http://home.wanadoo.nl/gigajosh/files/taskkill_en.zip and put it into the windows folder after you extract it. I've already tested it so I can verify it works. =D
First off, if using autorun.inf, you'd need to make a batch file, and run that batch file from autorun.inf. Then, in the batch file, each new line will make each program run consecutively. For example, your batch file could look like: Code: ccleaner.exe /AUTO c:\windows\system32\cleanmgr.exe /dc /sagerun: 1 shutdown /r /f When it gets to the end of the batch file, it'll terminate automatically. The /f tag on the shutdown line will force all open programs to close. Alternatively, you could use the taskkill command, like kk0425 mentioned. Syntax for that would look something like this: Code: taskkill /IM ccleaner.exe /F Hope this helps.