Sign in to follow this  
Followers 0
ksmith247

Script running from web server

4 posts in this topic

The script copies files from the web server to the local c:\temp directory but when it tries to kick off the install, I get an error. I assume the problem is because I am launching from a remote server, when the script gets to the part about the install it can't find the local C: drive. I'm sure the fix is something simple but I cant seem to locate it.

The specific error is

Line 0 (File "\\webserver.name.com\share$\setup.exe:):

$run = Run(@ComSpec & " /c c:\temp\msxml.msi /passive")

Error: Unable to execute the external program.

The directory name is invalid.

As always, thanks for the input.

RunAsSet("administrator", @computername, "password")

$copy = _FileCopy("\\webserver.name.com\share$\msxml.msi","C:\temp\")

Func _FileCopy($fromFile,$tofile) 
    Local $FOF_RESPOND_YES = 16
    Local $FOF_SIMPLEPROGRESS = 256
    $winShell = ObjCreate("shell.application")
    $winShell.namespace($tofile).CopyHere($fromFile,$FOF_RESPOND_YES)
EndFunc

While ProcessExists($copy)
    Sleep(50)
Wend

$run = Run(@ComSpec & " /c c:\temp\msxml.msi /passive")

While ProcessExists($run)
    sleep(50)
WEnd


RunAsSet()

Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

Share this post


Link to post
Share on other sites



I don't think you can just Run() an .msi file. Use ShellExecute(), include START in your DOS command line, or run msiexec.exe with the .msi as a prameter.

:)


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

It worked locally but bombed when running remotely. You sir, are a genius. Thank you yet again. :)


Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

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