Hello Tim,
There are some examples in the Internet, using VBScript's, to run applications as administrator.
You can execute VBSript's inside Your application with WSH ( Windows-Scripting-Host )
Save these 2 lines as : REGISTER.VBS
Set objSh = CreateObject("Shell.Application")
objSh.ShellExecute "REGSVR32.exe Application.dll", "" , "", "runas", 1Execute the VBSCRIPT inside Your Application :
Winexec('WSCRIPT.exe REGISTER.VBS') A C-Function
---------------
SHELLEXECUTEINFO shExecInfo;
shExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
shExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
shExecInfo.hwnd = NULL;
shExecInfo.lpVerb = _T("runas");
shExecInfo.lpFile = _T("MyAppl.exe");
shExecInfo.lpParameters = _T("-u");
shExecInfo.lpDirectory = strAppPath.text ();
shExecInfo.nShow = SW_SHOW;
shExecInfo.hInstApp = NULL;
ShellExecuteEx (&shExecInfo);
There is a post of mine in the Forum for another solution, how to use WSH.
viewtopic.php?f=3&t=14833&p=76680&hilit=scripting+host#p76680I think it also can work, using SHELLEXECUTE directly from inside FWH.
Have a look at this link, maybe it will give You some informations.
http://forums.techarena.in/vista-admini ... 977482.htmBest regards
Uwe
![Laughing :lol:](./images/smilies/icon_lol.gif)