|
Introduction |
This document will mainly cover command line usage and scripting (automation, batch files, vbscript etc), but it will also cover other things like debugging tools and generally anything that can make your life simpler when working with windows.
I will mostly cover things I have found useful and particularly anything that is easy to get wrong or forget :-)
It is a work in progress and will probably never be complete, let me know if you think I'm missing a great tool or technique that is not already covered. Real life example commands are also very useful.
For information about how to get the most out of this (Windows Compile Help) document please see "http://makemsi-manual.dennisbareis.com/how_to_use_this_documentation.htm".
See the following for introductions to basic windows concepts:
Some other windows sites:
Introduction to Batch Files |
Batch files are the simplest scripting (automation) mechanism provided by Windows. At its simplest it could be as small as a single command you need to re-use and saves you typing it every time, for example to get the latest version of a document off a file share you might type the following:
copy "\\SomeServer\SomeShare\SomeFile.doc" "c:\Documents"
If you put that command into a file called "gd.cmd" then all you would need to do is type "gd" to copy the file!
You could even add a shortcut for this batch file into the "Startup" folder or schedule that command with Window's task scheduler and have it happen automatically.
Batch files can contain many lines of windows commands, invoke other useful programs you have installed or make decisions and alter flow.
The following example shows how could create a backup of your EverNote notes to backup it up to your computer and to the cloud:
"C:\Program Files (x86)\Evernote\Evernote\ENScript.exe" exportNotes /q any: /f "C:\Dropbox\$Backups$\EVERNOTE BACKUP.enex"
There is a very good free PDF called "Batch File Programming (by S Premkumar)" which I recommend you have a look at.
Do not forget to look for useful programs even other scripting languages (such as rexx with its singe EXE no installation runtime) as anything that produces reasonable output to stdout or stderr can be used in batch file.
There are many interesting web sites where you can get more information (a good google should find them), there are quite a few good tips (and subroutines) at the "Batch Function Library for Windows NT4/2000/XP/2003" site, others are:
Some environment variable related links:
![]() ![]() |
| ![]() ![]() |