dspent Posted April 2, 2004 Share Posted April 2, 2004 I'm getting error when I run this script after login....I get no error if I run it on a local machine directly from the UNCOMPILED version... Here is the complete script edited for security... ;--------------------------------------------- ;First we must declare the following variables ;--------------------------------------------- Dim $UserName, $DomainName, $Password, $RunProgram, $RunPath ;--------------------------------------------- ;Next we will assign values to those variables ;--------------------------------------------- $UserName = "user" $DomainName = "domain" $Password = "pwd" $RunProgram = "\\netshare\to-my\file.exe /f /noui /noreboot" $RunPath = "\netshare\to-my" ;---------------------------------------------------------------- ;Now we will perform the install based on OS ;---------------------------------------------------------------- IF @OSType = "WIN32_NT" THEN RunAsSet($UserName, $DomainName, $Password) $val = RunWait($RunProgram, $RunPath) RunAsSet() ELSEIF @OSType = "WIN32_Windows" THEN $val = RunWait($RunProgram, $RunPath) ENDIF ExIT I am getting no errors when I run the script from my local machine, however once it is compiled and called from our login script I get an error that says it can't find the path or file. What's the deal here? Link to comment Share on other sites More sharing options...
GrahamS Posted April 2, 2004 Share Posted April 2, 2004 There appears to be a missing slash in $RunPath = "\netshare\to-my" It couldn't be that simple could it? GrahamS Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 My guess would be that your permisions are different, such as does everyone have the same drives? Does everyone have access to: \\netshare\to-my\file.exe /f /noui /noreboot and \netshare\to-my You may have a c:\netshare\to-my directory on everyone's computer, or you might have just edited out the other \ I don't know. anyway, does the compiled version work on your computer? Does the compiled version work if you log on to another computer? just a thought. AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
dspent Posted April 2, 2004 Author Share Posted April 2, 2004 everyone has access to the network share being referenced. In fact the \Everyone group has read access to the share. Link to comment Share on other sites More sharing options...
Marc Posted April 2, 2004 Share Posted April 2, 2004 If everyone has read access on this directory, why bother to select between the Windows-Versions and fiddle with RunAsSet? A simple $val = RunWait($RunProgram, $RunPath) should do the job, then... and it would exclude some error sources... I hope. Any of my own codes posted on the forum are free for use by others without any restriction of any kind. (WTFPL) Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 I was just thinking the program woulnd't work without proper access rights, say they were installing something. Did you say the compiled works on your machine? AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
dspent Posted April 2, 2004 Author Share Posted April 2, 2004 because in order to run the program on win nt/2000 and xp you must be an admin because it writes to the registry. Anyway.... I figured out why it wasn't running....In the ACTUAL version I misspelled the file name. Thanks for the help. Link to comment Share on other sites More sharing options...
scriptkitty Posted April 2, 2004 Share Posted April 2, 2004 LoL, I do that all the time. Glad you got it working. I was a bit stumped on this one. AutoIt3, the MACGYVER Pocket Knife for computers. 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