Jump to content

Remote Install issue with PSEXEC


Recommended Posts

:)

I don't quite understand what is wrong here other than the fact that i have a sace in my command (But I AM using quotes so...)

I can run this command in a DOS window and this works:

psexec \\testxp msiexec /quiet /i "c:\temp\RemoteInstall\msxml.msi"

So then I it in my Autoit script and it has a problem executing it. Here is my Autoit version:

$PSexec = """" & @ScriptDir & "\bin\psexec" & """"
    $File = "msxml.msi"
    $Source = @ScriptDir & "\apps\MSXML"
    $Dest = "\\" & $aPcList[$x] & "\c$\temp\RemoteInstall"
    $App = "msiexec /quiet /i " & """" & "c:\temp\RemoteInstall\" & $File & """"
    
    $RemoteInstallStatus = RunWait(@ComSpec & " /k " & $PSexec & " \\" & $PcName & " " & $App);& """" & " " & """" & " \\" & $PcName & " " & $App)

What this ends up becoming is:

"F:\Autoit Apps\Bin\psexec" \\testxp msiexec /quiet /i "c:\temp\remoteinstall\msxml.msi"

Yes, my folder has a space in it's name; hence the reason I'm using QUOTES to encapsulate it properly. Thus far, I haven't come up with any combination of using the QUOTES to make this work. And yes, I would prefer to use spaces in my folder names to make future development easier.

Thoughts?

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
Share on other sites

  • Developers

you could try this way :

$PSexec = '"' & @ScriptDir & "\bin\psexec" & '"'
$File = "msxml.msi"
$Source = @ScriptDir & "\apps\MSXML"
$App = "msiexec /quiet /i " & """" & "c:\temp\RemoteInstall\" & $File & """"
$PcName = "TestPC"
$RemoteInstallStatus = RunWait(@ComSpec & ' /k "' & $PSexec & ' \\' & $PcName & ' ' & $App & '"')

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

:);) Huh?! What?!

Ok, I got to tear this apart now. Yea, it works like a champ but how??? LOL. OMG What did you do? ;)

* Bows before you, the almighty command ine parser *

SWEEEETTT!!

Just a bit confused but hey, something for me to learn from ;)

THANK YOU 1000x over! This has plagued me for over 1 week.

you could try this way :

$PSexec = '"' & @ScriptDir & "\bin\psexec" & '"'
$File = "msxml.msi"
$Source = @ScriptDir & "\apps\MSXML"
$App = "msiexec /quiet /i " & """" & "c:\temp\RemoteInstall\" & $File & """"
$PcName = "TestPC"
$RemoteInstallStatus = RunWait(@ComSpec & ' /k "' & $PSexec & ' \\' & $PcName & ' ' & $App & '"')

Digital Chaos - Life as we know it today.I'm a Think Tank. Problem is, my tank is empty.The Quieter you are, the more you can HearWhich would you choose - Peace without Freedom or Freedom without Peace?Digital Chaos Macgyver ToolkitCompletely Dynamic MenuSQLIte controlsAD FunctionsEXCEL UDFPC / Software Inventory UDFPC / Software Inventory 2GaFrost's Admin Toolkit - My main competitor :)Virtual SystemsVMWAREMicrosoft Virtual PC 2007

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...