Jump to content

Vista RunasSet(?)


daslick
 Share

Recommended Posts

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.
Link to comment
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?

Link to comment
Share on other sites

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()
Link to comment
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?

Link to comment
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:
Link to comment
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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...