Airwolf Posted June 9, 2006 Share Posted June 9, 2006 (edited) @computername doesn't seem to do it's job when I run my script from a network path. Is there some other way to use local credentials if I'm running the script from let's say \\othermachine\userdata\shared? The script is doing a RunAs on a file in \\othermachine\userdata\shared\installfolder and it gives me bad username or password error. It seems like it's trying to use the credentials as a network user. EDIT - By the way, I cannot use psexec.exe, our network virus scanner picks it up and toasts it. Edited June 9, 2006 by Airwolf123 Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Developers Jos Posted June 9, 2006 Developers Share Posted June 9, 2006 @computername doesn't seem to do it's job when I run my script from a network path. Is there some other way to use local credentials if I'm running the script from let's say \\othermachine\userdata\shared? The script is doing a RunAs on a file in \\othermachine\userdata\shared\installfolder and it gives me bad username or password error. It seems like it's trying to use the credentials as a network user.EDIT - By the way, I cannot use psexec.exe, our network virus scanner picks it up and toasts it.Does the LOCAL credentials have any rights on the \\othermachine ?Alternative: Copy the file first to a local directory and then run it. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Airwolf Posted June 9, 2006 Author Share Posted June 9, 2006 Does the LOCAL credentials have any rights on the \\othermachine ?Alternative: Copy the file first to a local directory and then run it.Yes, it has full rights on the \\othermachine.And I can't copy the file unfortunately, it's a 300MB install. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Developers Jos Posted June 9, 2006 Developers Share Posted June 9, 2006 (edited) Yes, it has full rights on the \\othermachine.One thing to try is to set the Workdir to a directory thats available for the RunASSet userid.. (second parameter of Run/RunWait)And I can't copy the file unfortunately, it's a 300MB install. Don't you do the same when running it ? It will still copy.... Edited June 9, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Airwolf Posted June 9, 2006 Author Share Posted June 9, 2006 One thing to try is to set the Workdir to a directory thats available for the RunASSet userid.. (second parameter of Run/RunWait) Don't you do the same when running it ? It will still copy....I tried using @desktopdir and a few others, same problem. And if I do copy then install, it will have to copy 300MB then install it, then remove the files. I may have to resort to that, but I don't want to if I don't have to.Is there a way to do a Run("\\something\somefolder\someprogram.exe")? It won't let you use UNC paths as a command, but is there some way in autoit to run a network path file? As I said earlier, I can't use PSExec. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Developers Jos Posted June 9, 2006 Developers Share Posted June 9, 2006 (edited) I tried using @desktopdir and a few others, same problem. And if I do copy then install, it will have to copy 300MB then install it, then remove the files. I may have to resort to that, but I don't want to if I don't have to.Is there a way to do a Run("\\something\somefolder\someprogram.exe")? It won't let you use UNC paths as a command, but is there some way in autoit to run a network path file? As I said earlier, I can't use PSExec.That should be possible...Where is the script located when started ? also on a networkshare or locally?did you try: Run("\\something\somefolder\someprogram.exe",@tempdir) ? Edited June 9, 2006 by JdeB SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Airwolf Posted June 12, 2006 Author Share Posted June 12, 2006 That should be possible...Where is the script located when started ? also on a networkshare or locally?did you try: Run("\\something\somefolder\someprogram.exe",@tempdir) ?I just get an incorrect parameter error. The script is on a network share, but it doesn't work if I have a script dump it locally first either. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Developers Jos Posted June 12, 2006 Developers Share Posted June 12, 2006 I just get an incorrect parameter error.Don't understand the error you get. Can you show the exact syntax you use when getting the error ? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
kimonxx Posted June 14, 2006 Share Posted June 14, 2006 (edited) hi, i guess i have the same problem as airwolf. when i run a program (a compiled .au3 script) with the runasset userid and there are macros in the program like @logonserver the macro is not passed to the runasset user. example: MsgBox(0, "logonserver for " & @UserName & ":", @LogonServer) ; user is the runasset user DirCopy(@LogonServer & "\somefolder\someotherfolder", @ProgramsCommonDir & "\somefolder\someotherfolder", 1) @username is the runasset user, @logonserver is empty... but the macro @programscommondir is set correctly. any ideas? Edited June 14, 2006 by domi974 --------------------------------------------- cheers kimon 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