daslick Posted February 8, 2007 Posted February 8, 2007 When I use runasset then run on any file in windows vista I get this error: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\User\Documents\code\testscript.au3" C:\Users\User\Documents\virulence code\testscript.au3 (2) : ==> Unable to execute the external program.: Run("cmd.exe") The directory name is invalid.
Thatsgreat2345 Posted February 8, 2007 Posted February 8, 2007 I think I know your problem... starts with a V and ends with ista do you give up, well its Vista.
Bosse Posted February 8, 2007 Posted February 8, 2007 Have you included the "#RequireAdmin" directive in your script? I don't know this will solve the problem, but you can give it a try.
daslick Posted February 8, 2007 Author Posted February 8, 2007 Thatsgreat234, actually Vista is pretty good... a few problems, but very few. Autoit just isn't fully compatible yet, so your response wasn't helpful. Bosse I do not have #RequireAdmin in my script because I am using RunAsSet(...) Does anyone have any idea's of another way to do runas or to fix my problem with runasset?
WeMartiansAreFriendly Posted February 8, 2007 Posted February 8, 2007 (edited) http://www.autoitscript.com/autoit3/docs/f...ns/RunAsSet.htmThis function allows subsequent Run and RunWait functions to run as a different user (e.g. Administrator). The function only works on the 2000/XP (or later) platforms. NT4 users should install and use the SU command from the NT Resource Kit.The "Secondary Logon service" or "RunAs service" must not be disabled if you want this function to work.To unset the RunAs details, use the function with no parameters: RunAsSet().maybe that could be the problem? Edited February 8, 2007 by mrRevoked Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()
daslick Posted February 9, 2007 Author Posted February 9, 2007 "seclogon" described as the 'Secondary Logon' is running on my computer... Maybe the service is not named the same as it was in XP, which could make it not work, depending on how autoit sends the runas/run commands to windows. Will anyone else with vista try it out?
Confuzzled Posted February 10, 2007 Posted February 10, 2007 When I use runasset then run on any file in windows vista I get this error: >"C:\Program Files\AutoIt3\SciTE\..\autoit3.exe" /ErrorStdOut "C:\Users\User\Documents\code\testscript.au3" C:\Users\User\Documents\virulence code\testscript.au3 (2) : ==> Unable to execute the external program.: Run("cmd.exe") The directory name is invalid.Maybe the 'virulence' code was nobbled by the security tools in the background...
daslick Posted February 16, 2007 Author Posted February 16, 2007 maybe that should be fixed in future versions
Valik Posted February 17, 2007 Posted February 17, 2007 I've answered this so many times it's ridiculous. You're not specifying the working directory, you're letting AutoIt do it for you. You're most likely running this script from a part of your profile (probably the Desktop). Your profile is not a valid directory for other users. There-fore, Run() will fail. Always explicitly specify the working directory when you use RunAsSet() and subsequently call Run(). Set it to a directory that you know all users have access rights to. This has absolutely nothing to do with Vista.
daslick Posted February 23, 2007 Author Posted February 23, 2007 I ran the same code on XP. Maybe I do need to supply a working directory... I will try that. Could it be that Vista requires a working directory? I'll test it like you said and post the results.
daslick Posted February 24, 2007 Author Posted February 24, 2007 Ya. It works Almost ALL my code works in Vista now. $\|\|33-|-|\|3$$
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