oudmasterMemberAug 29, 2017 at 6:54 am #167180
appreciate if someone can give me an example on my requirement, unfortunately I am very new to Windows scripting,
I want my application server to do a task every day at 9:00am to install agents software on remote machines,
I have used google and got the basic staff which is:
psexec @c:test.txt -u domainusername -p password msiexec.exe /qn /i “\192.168.1.10ApplicationApp3.1.msi”
so I can use this Batch file with task scheduler, but the thing missing is, I want the server to skip the installation if the agent is already installed on the remote machine
something were available on the Internet like:
IF EXIST “filename” (
REM Do one thing
) ELSE (
REM Do another thing
but unfortunately I dont know how to link it with my command, I need help on this
universalMemberSep 04, 2017 at 4:47 am #388833
Is this an Active Directory domain environment? And if so, is there any particular reason why you can’t use Software Distribution via Group Policy to push this software to the remote computers?
sajan21inMemberSep 21, 2017 at 5:14 am #390021
actually I want to push the MSI to list of IP address instead of domain OU
wullieb1ModeratorSep 24, 2017 at 5:25 pm #245673
Is the typical way i would install a msi file. [CODE]msiexec [/CODE]
Is the typical way i would install a msi file.
biggles77SpectatorSep 25, 2017 at 12:04 am #214307oudmaster;n513738 wrote:actually I want to push the MSI to list of IP address instead of domain OU
Do you have Static IPs in your Domain?
CaTBuSParticipantOct 10, 2017 at 3:47 pm #309112
I recognize this post is a few months old but here is a batch script solution for anybody interested. Hope this helps:Code:[USER=”68995″]Echo[/USER] OFF
:: This script will check to see if the specified target is pingable else EXIT
:: If the target is pingable, it will check for the existance (or lack thereof) of Notepad.exe else EXIT
:: If Notepad does not reside on the target machine, it will execute the remote installation
PING -n 1 %USERHOST% >nul
IF %ERRORLEVEL%==0 (
) ELSE IF %ERRORLEVEL%==1 (
IF NOT EXIST %USERHOST%C$WINDOWSsystem32notepad.exe (
%~dp0psexec.exe %USERHOST% -h -u domainusername -p password msiexec.exe -i %MSI%
You must be logged in to reply to this topic.