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
- :
- Elevate privileges during installations (UAC issue)
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
‎Sep 08, 2011
03:26 PM
Elevate privileges during installations (UAC issue)
Project Type: InstallScript MSI
InstallShield version: 2011
I am been struggling to get this right. We have a project, with a "Workstation" feature (files are copied locally to the C drive), and a "Server" feature (files could be copied to a network shared drive - we have a script that reads a "drive file" from the C drive to determine where the files will be copied for this feature, and it could be a network shared drive).
Our current setup works fine in pre "UAC" OS, but if UAC is turned on it cannot copy files to the network drive.
The catch here is that, for the workstation we need "Administrator" privileges so that we can copy files to the C drive, so we have the "Required Execution Level" set to "Highest available" or "Administrator" as either of them work. However, this setting prevents the installer from copying files over a network drive.
If we set the "Required Execution Level" to "Invoker", the installer is able to copy files to the mapped network drive, but of course, it fails to copy files locally.
So, I was thinking that I could create a script to change the "Required Execution Level" for each feature, and set it to run on the OnInstalling feature event of each feature.
My questions are:
1. Will this approach work?
2. If 1=Yes, how do I change the "Required Execution Level" through code? Please provide example.
3. If 1=No, then how can I accomplish this?
Thanks much!
InstallShield version: 2011
I am been struggling to get this right. We have a project, with a "Workstation" feature (files are copied locally to the C drive), and a "Server" feature (files could be copied to a network shared drive - we have a script that reads a "drive file" from the C drive to determine where the files will be copied for this feature, and it could be a network shared drive).
Our current setup works fine in pre "UAC" OS, but if UAC is turned on it cannot copy files to the network drive.
The catch here is that, for the workstation we need "Administrator" privileges so that we can copy files to the C drive, so we have the "Required Execution Level" set to "Highest available" or "Administrator" as either of them work. However, this setting prevents the installer from copying files over a network drive.
If we set the "Required Execution Level" to "Invoker", the installer is able to copy files to the mapped network drive, but of course, it fails to copy files locally.
So, I was thinking that I could create a script to change the "Required Execution Level" for each feature, and set it to run on the OnInstalling feature event of each feature.
My questions are:
1. Will this approach work?
2. If 1=Yes, how do I change the "Required Execution Level" through code? Please provide example.
3. If 1=No, then how can I accomplish this?
Thanks much!
(2) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 08, 2011
04:19 PM
Check out this link, I think it addresses your issue.
http://technet.microsoft.com/en-us/library/ee844140(WS.10).aspx
Basically, mapped network drives do not by default make it into the elevated state of an application. There is a registry tweak that will allow this but it is not something you will be able to do on the fly in your installation, nor is it something I would force on your users. Have you thought about having the user specify a UNC to the network share?
http://technet.microsoft.com/en-us/library/ee844140(WS.10).aspx
Basically, mapped network drives do not by default make it into the elevated state of an application. There is a registry tweak that will allow this but it is not something you will be able to do on the fly in your installation, nor is it something I would force on your users. Have you thought about having the user specify a UNC to the network share?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Sep 09, 2011
07:04 AM
Thanks Eric!
We actually saw that, but we also saw somewhere else, probably on a KB article that Microsoft does not support that workaround.
We also would not want to force that on our users. We were hoping to get a resolution through the installer. Will the approach I suggest not work? It seems to me (logically thinking) that It would. Except, that I am not sure how to code the elevation of privilege.
We actually saw that, but we also saw somewhere else, probably on a KB article that Microsoft does not support that workaround.
We also would not want to force that on our users. We were hoping to get a resolution through the installer. Will the approach I suggest not work? It seems to me (logically thinking) that It would. Except, that I am not sure how to code the elevation of privilege.
