we had a little challenge below to see how secure this method is. LLXX proved it is insecure by 'recovering' the admin password from the compiled exe. + ty prp8683.
This guide will show how to launch an application with Administrative rights under a limited user account.
This is very useful for people who want to use Limited User accounts but have some apps/games that do not work native in this environment.
All you need is AutoIT (free) and the following code.
Create a txt file and put this (make changes as necessary) inside:
; Set the RunAs parameters to use local adminstrator account ; Run program as admin ; Reset user's permissions RunAsSet("username", "computername", "password") RunWait("C:\Program Files\Path\To.exe") RunAsSet()rename this file runas.au3
Now were just going to compile this as an exe so others cannot get the administrator password.
- Run Aut2Exe
- For Source choose the au3 file you just created.
- For Destiniation choose a name for the exe to be created.
- (Optional) Choose an Icon for the exe.
- Uncheck decompilation
- Finish by hitting Convert to create the exe!
- The Secondary Logon service must be running!
- You can always manually run/(un)install programs while a Limited User by right clicking on a file and selecting runas.
- The administrator account needs to have a password for this to work.
- If you are going to place this AutoIT exe in the same folder as the program you want to runas, for the path line in the script you can put just the name of the exe.
- You can extract the icon from any file using XN Resource Editor (free/standalone).
You can logon as Administrator by switching to the classic logon by hitting Ctrl+Alt+Del twice at the xp logon screen.
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList]"Administrator"=dword:00000000
Edited by DigeratiPrime, 19 July 2006 - 10:14 AM.