Solved

Psexec to install an MSI file

Posted on 2013-01-22
16
1,201 Views
Last Modified: 2013-02-04
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
Comment
Question by:WellingtonIS
  • 10
  • 5
16 Comments
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 38806026
does the system account has access to the shared folder?
0
 

Author Comment

by:WellingtonIS
ID: 38806035
yes it does.  I tried with -s cmd too
0
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 38806085
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
 

Author Comment

by:WellingtonIS
ID: 38806109
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
 

Author Comment

by:WellingtonIS
ID: 38806512
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
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 38806790
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
 

Author Comment

by:WellingtonIS
ID: 38806834
Tried that too.  It doesn't work.
0
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 38807010
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
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:WellingtonIS
ID: 38807062
I will try.
0
 

Author Comment

by:WellingtonIS
ID: 38807075
It finishes too fast to be running..  It looks like it runs but it does nothing.
0
 
LVL 14

Expert Comment

by:Justin Yeung
ID: 38807206
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
 

Author Comment

by:WellingtonIS
ID: 38807263
OK thanks much!
0
 

Author Comment

by:WellingtonIS
ID: 38809805
I'm getting Microsoft Installation success or error status:1603 and a Client Process Id: 3660
0
 
LVL 10

Accepted Solution

by:
Tony Barkdull earned 500 total points
ID: 38849177
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
 

Author Comment

by:WellingtonIS
ID: 38850932
OK will try thanks!
0
 

Author Closing Comment

by:WellingtonIS
ID: 38851786
That worked
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now