User User name Password  
   
Sunday 24.11.2024 / 04:56
Search AfterDawn Forums:        In English   Suomeksi   På svenska
afterdawn.com > forums > software, operating systems and more > windows - general discussion > how to make autorun.inf run multiple programs consecutevly
Show topics
 
Forums
Forums
How to make Autorun.inf run multiple programs consecutevly
  Jump to:
 
Posted Message
Member
_
17. September 2009 @ 14:51 _ Link to this message    Send private message to this user   
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
Advertisement
_
__
Member
_
17. September 2009 @ 14:52 _ Link to this message    Send private message to this user   
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
Junior Member
_
17. September 2009 @ 15:12 _ Link to this message    Send private message to this user   
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
Member
_
17. September 2009 @ 15:40 _ Link to this message    Send private message to this user   
What about setting it up to run one file after another?
Advertisement
_
__
 
_
Member
_
22. September 2009 @ 15:11 _ Link to this message    Send private message to this user   
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:

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:

taskkill /IM ccleaner.exe /F

Hope this helps.


afterdawn.com > forums > software, operating systems and more > windows - general discussion > how to make autorun.inf run multiple programs consecutevly
 

Digital video: AfterDawn.com | AfterDawn Forums
Music: MP3Lizard.com
Gaming: Blasteroids.com | Blasteroids Forums | Compare game prices
Software: Software downloads
Blogs: User profile pages
RSS feeds: AfterDawn.com News | Software updates | AfterDawn Forums
International: AfterDawn in Finnish | AfterDawn in Swedish | AfterDawn in Norwegian | download.fi
Navigate: Search | Site map
About us: About AfterDawn Ltd | Advertise on our sites | Rules, Restrictions, Legal disclaimer & Privacy policy
Contact us: Send feedback | Contact our media sales team
 
  © 1999-2024 by AfterDawn Ltd.

  IDG TechNetwork