Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1263
  • 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 YeungCommented:
does the system account has access to the shared folder?
0
 
WellingtonISAuthor Commented:
yes it does.  I tried with -s cmd too
0
 
Justin YeungCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 YeungCommented:
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 YeungCommented:
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 YeungCommented:
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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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