Sign in to follow this  
Followers 0
daslick

Vista RunasSet(?)

11 posts in this topic

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.

Share this post


Link to post
Share on other sites



I think I know your problem... starts with a V and ends with ista do you give up, well its Vista.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

http://www.autoitscript.com/autoit3/docs/f...ns/RunAsSet.htm

This 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 by mrRevoked

Don't bother, It's inside your monitor!------GUISetOnEvent should behave more like HotKeySet()

Share this post


Link to post
Share on other sites

"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?

Share this post


Link to post
Share on other sites

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... :whistle:

Share this post


Link to post
Share on other sites

maybe that should be fixed in future versions :whistle:

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Ya. It works :whistle:

Almost ALL my code works in Vista now. $\|\|33-|-|\|3$$

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