In Standard user mode launch a Exe as Non-Elevated ( Lower privelage ) from an Elevated Exe using Administrator privelage ??
-
Hello Friends, i have typical problem when using Standard user mode in Window Vista OS. Please find below the exact scenario & thanks in advance for your valuable inputs. => In Standard user mode i run my Setup.exe, it prompts for Admin rights to install the product. At the end of the Installation it will launch "Second Exe", which will look for updates (As per Vista rules this exe will also have full privileges). After completing the updates "Second Exe" will try to launch the "My product". But the current problem is, it will launch "My product" in Admin Privileges, instead of that i want to launch "My Product" with the current user privileges i-e in standard user mode, not with ADMIN privileges. Thanks in Advance. :)
-
Hello Friends, i have typical problem when using Standard user mode in Window Vista OS. Please find below the exact scenario & thanks in advance for your valuable inputs. => In Standard user mode i run my Setup.exe, it prompts for Admin rights to install the product. At the end of the Installation it will launch "Second Exe", which will look for updates (As per Vista rules this exe will also have full privileges). After completing the updates "Second Exe" will try to launch the "My product". But the current problem is, it will launch "My product" in Admin Privileges, instead of that i want to launch "My Product" with the current user privileges i-e in standard user mode, not with ADMIN privileges. Thanks in Advance. :)
Basically you can't, you either need to ensure "Second Exe" is not elevated or accept that "My Product" will run elevated if you launch it from the setup kit. Another approach would be to stop "Second.exe" from launching "My Product" automatically and rely on the user starting the application themselves. regards,
Jonathan Wilkes Darka[Xanya.net] [My Code Project Articles]
-
Hello Friends, i have typical problem when using Standard user mode in Window Vista OS. Please find below the exact scenario & thanks in advance for your valuable inputs. => In Standard user mode i run my Setup.exe, it prompts for Admin rights to install the product. At the end of the Installation it will launch "Second Exe", which will look for updates (As per Vista rules this exe will also have full privileges). After completing the updates "Second Exe" will try to launch the "My product". But the current problem is, it will launch "My product" in Admin Privileges, instead of that i want to launch "My Product" with the current user privileges i-e in standard user mode, not with ADMIN privileges. Thanks in Advance. :)
You need to launch the process in with Admin credential using CreateProcessWithLogonW and pass admin credentials to its some of the parameters and the process you want to lauch in standard user account launch it with CreateProcess by passing standard user credentials. You might need to write third application to launch these processes. (e.g. Third.exe --->Launch AdminProcess.exe & Third.exe ---> StandardUser.exe)
SNI