Page Last Updated: 24/04/2011 Getting Started - Initial Script File Creation
Before you can create your script, you need to create the initial file that will hold you commands.
All examples on this web site use notepad. It is simple and is available on all machines. You may want to use your preferred text editor to once you are comfortable with how scripts work. You should also ensure that "word wrap" is turned off as wrapping of commands can cause problems.
- Start Notepad - which creates a blank file.
- Ensure that "word wrap" is turned off ("Format" --> "Word Wrap")
- (Optional at this point) Enter some commands from the examples on this web site.
- Click "File" then "Save As".
- Change the "Save as type" to "All Files". This allows you to enter your own extension.
- (If you have other options, leave these alone.)
- (Optional) Create a new directory to store your login script in. This can be useful when you are working on scripts as you know where they are. Change to this newly created directory.
- Enter the filename "login.bat" and press save.
You now have a file that will run if you double click on it.
Editing the File
If you wish to edit it again, right click on the file and choose "Edit".
Entering paths
When you are writing paths to files or directories, it is always a good rule of thumb to enclose the path in quotes. This is required if the path has spaces in it - for example when you are referencing "program files" but doesn't do any harm to use it for all paths and is a good habit to get in to.
For example:
"c:\program files\office"
instead of
c:\program files\office
|