Showing posts with label step-by-step. Show all posts
Showing posts with label step-by-step. Show all posts

Friday, March 4, 2011

Batch File to Open URL

Today I am glad to introduce this short post that should give the answer to a short user's question. The question was "How to open URL via batch file?".
Fortunately, to open URL with the default system browser, you should do almost nothing. The sequence of action looks like this:
1) Start Dr.Batcher and create a new batch script;
2) Switch to Simple mode;
3) Add a new command named "Start a Separate Command Promt" (START);
4) Change the value of parameter 'Command or program to start" to your URL surrounded with commas (for example, "http://www.drbatcher.com");
5) Set other needful parameters;
6) Add more URLs if necessary;
7) Enjoy!

Wednesday, January 19, 2011

Detecting the Insertion of USB Flash in Batch Files

How to detect that user inserts USB Flash drive and make computer shut down after this? Here you can see step-by-step explanation.
1. Download and install Dr.Batcher, the program designed to create and edit batch files.
2. Start Dr.Batcher and create new empty batch script (File->New->Empty Batch Script).
3. Add command named "Display a message" (Command->Add), click OK in the "Add Command" dialog.
4. Choose "off" as the first parameter and click "OK".
5. Add command named "Set Label".
6. Set loop as a label name, click "OK".
7. Add command named "If (Condition)". Choose "Edit the condition" in the appeared dialog.
8. Choose "File Exists (Condition Only)". 9. Set the letter of the flash drive as the parameter in the following dialog. Note: "\." after the drive letter should not be removed.
9. Add command named "Go to a Label".
10. Set loop as the label name. Click "OK".
11. Following the instructions in paragraphs 5 and 6, add a label with name end.
12. Add command named "Shut Down or Restart Computer".
13. Set the first parameter of this command equal to -r to restart or -s to shut down
14. To make this file start automatically when you log on, place it inside the "Startup" folder in Start menu.
15. Enjoy!

Translate