Basic scripting/batch files in Windows 7
I'm not generally a scripter, but I'm in a position now where I have to make some basic install/batch scripts in Windows 7 to speed along some installations. So far, I've created on a single line Powershell script line to connect my Win 7 PCs to the domain (basically from reading through the parameters for the add-computer command. For this new project, I need to create a basic script that will: connect to a specifc folder on a shared volume, run some preset commands (waiting for each command to fully complete). There are a total of 7 commands, but the systems has to reboot after the 5th command before continuing). So, I have all the commands already there for me, I just need to figure out how to script them to do the pausing, force a restart and then complete the script after restart/logging back in. Any suggestions about which scripting language to use for this kind of project along with some good training materials (books or web based) for someone like me who's starting from scratch in the scripting? Thanks in advance!
February 9th, 2012 3:53pm

It might be easier if you said the commands were exactly. I use batch files to fire off my PowerShell scripts, but any of the languages can get a little dirty when a reboot is involved. PowerShell also only processes one command to completion. So I have a batch file that connects to a network drive, dowloads files, installs a driver, creates a port, installs a printer, prints a test page, removes the downloaded file and terminates. All of that is programmed without a pause as Powershell focuses only on the task at hand.
Free Windows Admin Tool Kit Click here and download it now
February 9th, 2012 4:07pm

Hi, If you want to compose scripts, you may post a thread at http://social.technet.microsoft.com/Forums/en/ITCG/threads/ for help. Also, to install applicaiton via script need to involve msiexec command. The following link is for your reference. http://technet.microsoft.com/en-us/library/cc759262(WS.10).aspx Learn Scripting http://technet.microsoft.com/en-us/scriptcenter/dd793612 Juke Chou TechNet Community Support
February 13th, 2012 3:57am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics