mrrlg Posted November 28, 2005 Share Posted November 28, 2005 I have a small application that takes a "snapshot" of the computer's configuration. I would like to run it from a network share against my user's computers in remote locations without having to install and uninstall it on each pc. If I enter \\server\share\sea.exe /log at the user's dos prompt it works fine and creates a log in whatever local directory the dos prompt is at. Then I have to search for the log file. It could be in the root directory or C:\documents and settings... I would like to execute the program, create the log in the network share and minimize everything as far as the user is concerned. I have tried run('"\\server\share\sea.exe" /log') and it appears to write the log but I cannot find it on either the network share or the user's pc. Without the /log command the executable does work so I know that part of the script works. Is there a way to script where the log file is written? Link to comment Share on other sites More sharing options...
Sokko Posted November 28, 2005 Share Posted November 28, 2005 Try executing the Run function with the "working directory" parameter. Run('"\\server\share\sea.exe" /log',"\\server\share") There's a good chance that the above command will write the log file to the \\server\share directory. If it doesn't, see whether the program itself has a parameter that allows you to specify the output location. Many command-line programs have "/?" or "/help" switches that will give you information about what parameters they take. Link to comment Share on other sites More sharing options...
Zedna Posted November 28, 2005 Share Posted November 28, 2005 Try use second parameter in function Run which is working directory, I think LOG will be there... Run('"\\server\share\sea.exe" /log',"C:\somewhere\to store\log\") Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
kpu Posted November 28, 2005 Share Posted November 28, 2005 Check out psexec.exe from http://www.sysinternals.com for executing a command remotely. I use this quite often as it works great. It can copy the executable to the remote PC and run it. Or use it along with teh FileInstall() command.If you want to run it manually from the users PC, try something like this:$cmd = '"\\server\sea.exe" /log' runwait(@comspec & " /c " & $cmd,"",@SW_HIDE) http://www.kpunderground.com Link to comment Share on other sites More sharing options...
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