How to Write a Simple Script to Install a Program

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.
Write a Simple Script to Install a Program

If you have a large number of computers that all need new programs installed, it can be very time-consuming to sit at each machine and manually start the installation programs. If you write a simple script program and distribute it to each computer, you can have the users start the installation on their own by running the script.

Advertisement

Step 1

Power on your computer and click on the "Start" button at the bottom-left side of the desktop. Click on "Programs" and then scroll through the list of options and choose "Microsoft Notepad."

Video of the Day

Step 2

Click on "My Computer" and navigate to the folder where the installation file is located for the program you want to install. Right-click on the file and then click on "Properties" from the menu that pops up.

Advertisement

Step 3

Highlight the full path location of the file, such as "D:\CD\Install.exe," and then right-click. Choose "Copy" from the menu that pops up to copy the location information.

Step 4

Navigate back to the Notepad program you opened earlier. Type the word "START" in all caps on the first line. Press the space bar once and then right-click and choose "Paste" to paste the location of the installation program. Check that the line reads exactly like "START D:\CD\Install.exe" without any extra spaces or characters.

Advertisement

Advertisement

Step 5

Click on "File" at the top toolbar and then click on "Save." Name the file whatever you want, but change the extension from ".txt" to ".bat," such as "InstallFile.bat."

Step 6

Close the file. Double-click on it to run the script and install the program. Save the file to an external source, such as a jump drive or CD-RW, and take it to any other computer that needs to run the script and install the program.

Advertisement

Step 7

Navigate to the location where you saved the batch file and right-click on it if you need to edit it. Choose "Edit" or "Open With Notepad" from the new menu that pops up to open the file in Notepad for editing.

Video of the Day

Advertisement

Advertisement

resources

Report an Issue

screenshot of the current page

Screenshot loading...