Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1277
  • Last Modified:

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
0
WellingtonIS
Asked:
WellingtonIS
  • 10
  • 5
1 Solution
 
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
 
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
 
Tony BarkdullCommented:
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
 
WellingtonISAuthor Commented:
OK will try thanks!
0
 
WellingtonISAuthor Commented:
That worked
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 10
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now