This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: execute a program from within installashield 2012 script running with elevated privil
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2012
11:34 AM
execute a program from within installashield 2012 script running with elevated privil
Hi all,
In a Windows 7 environment,logon with User rights,i need to run a InstallScript Exe.
From within the installscript,i need to execute another .exe,using elevated privilege,and then i need to impersonate an administrator account for doing this.
There are examples or instructions to resolve this question?
Thanks to all in advance
Frank
In a Windows 7 environment,logon with User rights,i need to run a InstallScript Exe.
From within the installscript,i need to execute another .exe,using elevated privilege,and then i need to impersonate an administrator account for doing this.
There are examples or instructions to resolve this question?
Thanks to all in advance
Frank
(5) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 09, 2012
01:46 PM
You can launch an EXE through ShellExecute (to perform a runas operation) using the InstallScript LaunchApplication function and passing LAAW_OPTION_USE_SHELLEXECUTE in the nOptions parameter (along with any other options needed). The shell execute verb to use is set through the LAAW_SHELLEXECUTEVERB variable (the default is runas).
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 10, 2012
09:01 AM
Thank you Josh Stechnij for your reply,but my problem is: i've logged with user privileges,and then when i launch application,i need to impersonificate a administrative account because i must write in to the windows registry.
Where i can set credentials of the admin account?
thanks in advance
Frank
Where i can set credentials of the admin account?
thanks in advance
Frank
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 10, 2012
12:23 PM
With ShellExecute launching a new process (Vista and newer) with the runas verb, a UAC prompt will be displayed asking for consent to run the new process elevated. If the new process is being launched from an account with standard user privileges (a user that does not belong to the admin group), the UAC prompt will request credentials of a user on the machine that has administrator privileges.
If this behavior is insufficient for some reason, you may try requesting the credentials and then use an API such as CreateProcessWithLogonW (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682431(v=vs.85).aspx) to launch the new process with the obtained credentials.
If this behavior is insufficient for some reason, you may try requesting the credentials and then use an API such as CreateProcessWithLogonW (http://msdn.microsoft.com/en-us/library/windows/desktop/ms682431(v=vs.85).aspx) to launch the new process with the obtained credentials.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jan 11, 2012
03:44 AM
Thanks for your reply Josh.
Using Createprocesswithlogonw with UAC set to on,i receive error:740.
If i set to off UAC ,it works fine
Best regards
Frank
Using Createprocesswithlogonw with UAC set to on,i receive error:740.
If i set to off UAC ,it works fine
Best regards
Frank
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Jul 30, 2012
06:42 AM
Hi,
I am using Installshield 2009. I want to create setup by using Basic MSI in such way that setup can run without admin rights.
Anybody knows how to do this,please respond as earliest possible.
I am using Installshield 2009. I want to create setup by using Basic MSI in such way that setup can run without admin rights.
Anybody knows how to do this,please respond as earliest possible.