Sign in to follow this  
Followers 0
Jamaica

Using UNC paths

9 posts in this topic

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??

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

:)

Share this post


Link to post
Share on other sites

#4 ·  Posted (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 by skysel

Share this post


Link to post
Share on other sites

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??

I'm missing the share!

What about: Run("\\Server\sharename$\dir\setup.exe /S /v/qn")

Share this post


Link to post
Share on other sites

I'm missing the share!

What about: Run("\\Server\sharename$\dir\setup.exe /S /v/qn")

Heh, actualy \\Server\dir is the sharename :)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Heh, actualy \\Server\dir is the sharename :)

You might also try --

$dir = "\\Server\dir"

Run($dir "\setup.exe /S /v/qn", $dir)

Edited by rogerd2u

Roger O."When people show you who they are, believe them.” --Mark Twain

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

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  
Followers 0