Jamaica Posted December 10, 2008 Posted December 10, 2008 I want to install software and run the install from a server using the application install switches but I get no install to commence. Here is the script i'm using Run("\\Server\dir\setup.exe /S /v/qn") Whats wrong with this picture??
PsaltyDS Posted December 10, 2008 Posted December 10, 2008 I want to install software and run the install from a server using the application install switches but I get no install to commence. Here is the script i'm using Run("\\Server\dir\setup.exe /S /v/qn") Whats wrong with this picture?? Are you sure the script has access to that share at run time? You might also need to provide a working directory. Maybe: $sDir = "\\Server\dir" $sExe = "setup.exe" $sPath = $sDir & "\" & $sExe If FileExists($sPath) Then ShellExecute($sPath, "/S /v /qn", $sDir) Else MsgBox(16, "Error", "File not found: " & $sPath) Exit EndIf Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Jamaica Posted December 10, 2008 Author Posted December 10, 2008 Yes, the script has access to the server with full rights to the dir where the setup.exe is located. I'll try what you suggested an give a shout back. ShellExecute is the trick I see. Thanks. Are you sure the script has access to that share at run time? You might also need to provide a working directory. Maybe: $sDir = "\\Server\dir" $sExe = "setup.exe" $sPath = $sDir & "\" & $sExe If FileExists($sPath) Then ShellExecute($sPath, "/S /v /qn", $sDir) Else MsgBox(16, "Error", "File not found: " & $sPath) Exit EndIf
skysel Posted December 10, 2008 Posted December 10, 2008 (edited) Yes, the script has access to the server with full rights to the dir where the setup.exe is located. I'll try what you suggested an give a shout back. ShellExecute is the trick I see. Thanks. I never had problems running from UNC path. As long you were authenticated to see that UNC paths And I used rather: RunWait(@ScriptDir & "\1\AICinstall\AgentInstaller\AgentInstaller.exe") Meaning script is running from \\server\somefolder\script.exe .. Edited December 10, 2008 by skysel
fielmann Posted December 10, 2008 Posted December 10, 2008 I want to install software and run the install from a server using the application install switches but I get no install to commence. Here is the script i'm usingRun("\\Server\dir\setup.exe /S /v/qn")Whats wrong with this picture??I'm missing the share!What about: Run("\\Server\sharename$\dir\setup.exe /S /v/qn")
skysel Posted December 10, 2008 Posted December 10, 2008 I'm missing the share!What about: Run("\\Server\sharename$\dir\setup.exe /S /v/qn")Heh, actualy \\Server\dir is the sharename
rogerd2u Posted December 10, 2008 Posted December 10, 2008 (edited) Heh, actualy \\Server\dir is the sharename You might also try -- $dir = "\\Server\dir"Run($dir "\setup.exe /S /v/qn", $dir) Edited December 10, 2008 by rogerd2u Roger O."When people show you who they are, believe them. --Mark Twain
PsaltyDS Posted December 10, 2008 Posted December 10, 2008 You might also try -- $dir = "\\Server\dir"Run($dir "\setup.exe /S /v/qn", $dir)You need the concatenate "&" operator for that: Run($dir & "\setup.exe /S /v/qn", $dir) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
rogerd2u Posted December 10, 2008 Posted December 10, 2008 You need the concatenate "&" operator for that: Run($dir & "\setup.exe /S /v/qn", $dir) Oops! That's what I get for typing the code directly in the forum, and not in SciTe!! Roger O."When people show you who they are, believe them. --Mark Twain
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now