Jump to content

Recommended Posts

Posted

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.
Posted

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.

Posted

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?

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()
Posted

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

Posted

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:
Posted

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.

Posted

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.

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
  • Recently Browsing   0 members

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