Recently I needed to install some software on a bunch of machines but being the lazy git that I am I decided I couldn’t be bothered to walk upstairs, run the installer as me and install the software…so instead I created three convoluted batch scripts to do it:
Few things to note: I’m using PS Tools to run the scripts with my domain admin account, this is the same as shift right clicking the software as running as me!
I’m also using PS Tools to specify a list of PC’s!
Script one:
Copies an installation exe file from a server to a PC:
xcopy "\\SERVER\Software\LOnline.exe" "c:\" /Y /R
Script two:
Looks at a list of PC’s and runs the above script for each PC in the list:
PsExec.exe @c:\Computers.txt -u DOMAIN\USER -p PASSWORD -c "c:\CopyToPC.bat" > c:\commands1.log
Script three:
Looks at a list of PC’s then remotely installs the file LOnline.exe that you just copied to the pc remotely, I’m running the exe interactively when it’s done it pops a message to tell the user its done!!:
psexec.exe @C:\Computers.txt -d -i -u DOMAIN\USERNAME -p PASSWORD c:\LOnline.exe /i
I’m sure there is a much easier way of doing the above in one script but this was a very quick solution I put together!!
That’s really helpful. Also you can use Action1 as an alternative to PSTOOLS or PowerShell. This program allows you to install software remotely on multiple computers.
https://www.action1.com/f/Free-Install-Software-Remotely-atm-58.html