Jump to content
Sign in to follow this  
dinodod

Remote Install issue with PSEXEC

Recommended Posts

dinodod

:)

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

Share this post


Link to post
Share on other sites
Jos

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 & '"')

Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
dinodod

:);) 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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.