|
Running Several Programs (batch)
You must already know how to use batch commands to use this page. I accept
no responsibility for any accidents you have using batch commands. Lines that begin with REM are comments, and ECHO displays useful text in the command "window" - these lines are not required.
Start All Your Favorite ProgramsDo you start the same three programs every time you start your computer? Running this batch program starts my 3 favorite programs and exits. You can even use Task Scheduler to automate this on every login. Copy these batch commands into a file called RunApps.bat. You must edit programs paths (in quotes) to match your own, followed by a "space" and the name of the program file. It's good practice to use quotes for all paths in batch programs, since paths containing a "space" require it.
REM RunApps.bat starts up the following programs and exits:
start /d "C:\Program Files (x86)\NoteTab Pro 6" NotePro.exe start /d "C:\Program Files (x86)\Mozilla Firefox" firefox.exe start /d "C:\Program Files (x86)\Mozilla Thunderbird" thunderbird.exe To get the "path", right click on the program shortcut icon, select Properties, and copy the Target line. Type CTRL+C to copy the text and CTRL+P to paste it. Save the batch program as RunApps.bat. Once RunApps.bat is working properly, create a shortcut on your desktop. Right-click the shortcut and select "Properties". In the Shortcut key box, type CTRL+ALT+A. In the Run window select Minimized from the drop-down choices. You can even select a nice icon for it. Now you can start your programs by typing that key combination. Your 3 programs start up easily and the batch program window doesn't even appear. If you prefer, you can use Windows Task Scheduler to automate it at logon. Run Cleanup Programs automaticallyThis batch program runs the popular file cleaner Ccleaner for a 64-bit system (ccleaner64), waits until it completes, then runs Disk Cleanup (cleanmgr). Ccleaner is a popular freeware program that cleans up temporary files, the recycle bin, browser cache files, etc. You should select all the items you want to delete before running the program from a batch program. In a similar fashion, you first run cleanmgr set up your deletion choices in a "sageset" to automate the Disk Cleanup program - I used number "99".
To select what you want to delete, run the following line (edit path to match your system) - right-click START and select Run and type:
Now you can run cleanmgr using /sagerun:99 in a batch program in order to delete those items. [Microsoft Help] For the Ccleaner64 "WAIT" command to work you must run the batch program with Administrative Rights: Create a shortcut, then right-click on it and select Properties, then Advanced. Check Run as Administrator and click OK to close. Save the batch program below as Clean.bat and edit paths to match your programs.
Select text and type CTRL+C keys to copy it.
REM Clean.bat starts up these 2 cleanup programs and exits:
ECHO 1. Start Ccleaner64... "C:\Program Files (x86)\CCleaner\CCleaner64.exe" /WAIT /AUTO ECHO 2. Start CleanMgr... C:\Windows\System32\cleanmgr.exe /sagerun:99 EXIT To your file cleaning, you can add any maintenance tasks that can be automated. Then use Windows Task Scheduler to run Clean.bat shortcut at logon or logoff. |
||||||||||||||||||||||||||||||||||||||
The PDQ Library is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
|