Psexec to install an MSI file

I have a file called Microsoftfixit50154.msi where you have to accept the agreement in order for it to run... I'm trying to install this with PSexec I've tried various things..  

@echo off
set /p var= Enter Computer Name:
set /p var2=Enter the File Name:

Psexec \\%var% -s cmd /c copy "\\share\folder\%var2%" c:\

psexec \\%var% -s msiexec.exe /i %Var2% /q

psexec  \\%var% -s cmd /c del "c:\%var2%"

And just a simple:
psexec.exe \\remotecomputer -s msiexec.exe /i  c:\xxx.msi /qn after copying the file to the c drive.

Nothing is working
WellingtonISAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Tony BarkdullConnect With a Mentor Commented:
What I do is put the install command in a batch file like install.bat, copy it and the msi to the remote computer c:\ drive, then run this

psexec \\remotecomputer c:\install.bat

The install will run in a command window and install normally.

Note: I have found that using UNC shares in the install.bat on remote PCs to be problematic, so copy the msi local, run the install, and then delete it
0
 
Justin YeungSenior Systems EngineerCommented:
does the system account has access to the shared folder?
0
 
WellingtonISAuthor Commented:
yes it does.  I tried with -s cmd too
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Justin YeungSenior Systems EngineerCommented:
i can see that you used -s and what i am saying is since it is a shared folder, the local machine system account might not have access to the shared folder. unless it is opened to everyone groups.

did you see the file copied to the specified machine?
0
 
WellingtonISAuthor Commented:
Yes sorry.  The file is on the remote machine.  I copied it there.  If I run the command on the machine.exe /i c:\microsoftfixit50154.msi  it will at least get me to the screen where I have to accept the agreement.  I can't get it to work remotely
0
 
WellingtonISAuthor Commented:
OK I think part of this issue is when you click on the actual fix it asks you to run it...  Then it has an agreement however, I think I might have found a way around it with AGREETOLICENSE="yes"
0
 
Justin YeungSenior Systems EngineerCommented:
i believe you are missing cmd /c in front of msiexec

for some reason it require msiexec to run under cmd by using psexec
0
 
WellingtonISAuthor Commented:
Tried that too.  It doesn't work.
0
 
Justin YeungSenior Systems EngineerCommented:
psexec \\%var% -s cmd /c "msiexec.exe /i c:\%Var2% /q"

try this

added cmd /c "" in between the string and the full path fo the msi file.
0
 
WellingtonISAuthor Commented:
I will try.
0
 
WellingtonISAuthor Commented:
It finishes too fast to be running..  It looks like it runs but it does nothing.
0
 
Justin YeungSenior Systems EngineerCommented:
try to test your install with /passive instead of /qn

so you can see if any process is actually ran.

and check the log under event viewer and see if it ran or any error
0
 
WellingtonISAuthor Commented:
OK thanks much!
0
 
WellingtonISAuthor Commented:
I'm getting Microsoft Installation success or error status:1603 and a Client Process Id: 3660
0
 
WellingtonISAuthor Commented:
OK will try thanks!
0
 
WellingtonISAuthor Commented:
That worked
0
All Courses

From novice to tech pro — start learning today.