tom_kinco
Posts: 12
Joined: Thu Mar 09, 2017 11:25 am

how to avoid the "User Account Control"

Dear all,
I wonder how to avoid the exe file in the target PC show "User Account Control", and need to confirm.
Please give me some example is you have experience.
Thanks you very much.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: how to avoid the "User Account Control"

Hi,

In order for your application not to display the User Account Control dialog during the installation, you can set it to be installed "per-user" in the "Install Parameters" page. You can read more details in the "Windows User Account Control (UAC)" article.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tom_kinco
Posts: 12
Joined: Thu Mar 09, 2017 11:25 am

Re: how to avoid the "User Account Control"

Hi,Eusebiu
Thanks for your reply but seems it doesn't works.
I run the package on my virtual machine.
I want to add my questions:
1, set "per-user" in the "Install Parameters" page, can I change the application folder to "[ProgramFilesFolder][Manufacturer]\[ProductName]", since it's not a default setting if I chose "per-user".
2, how can I uninstall my application anyhow, I find in my target computer, the uninstall process is finished successfully,but the files were not deleted.
3, except for the "Wizards->Import", is there anything(e.g. vidios or "operating steps“) can help me to make a package easily without show "UAC" infomation,target EXE can run with "administrators rights", and can easily uninstall without fail? Since I don't have too much time to study this tool.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: how to avoid the "User Account Control"

Hi,
1, set "per-user" in the "Install Parameters" page, can I change the application folder to "[ProgramFilesFolder][Manufacturer]\[ProductName]", since it's not a default setting if I chose "per-user".
No, I'm afraid that this is not correct. The "Program Files" folder requires administrator privileges and it is not compatible with a "per-user only" package.
2, how can I uninstall my application anyhow, I find in my target computer, the uninstall process is finished successfully,but the files were not deleted.
This may happen because of multiple tests done on the same machine. So, we recommend tests to be done on clean virtual machines that can be easily restored to their clean state.

Can you reproduce the problem on multiple clean machines? You can try to clean all the unnecessary information remained on your machine about the product that fails, by using the following Windows Installer CleanUp tool.
3, except for the "Wizards->Import", is there anything(e.g. vidios or "operating steps“) can help me to make a package easily without show "UAC" infomation,target EXE can run with "administrators rights", and can easily uninstall without fail? Since I don't have too much time to study this tool.
In order to avoid the UAC prompt, you need to only select the "per-user only" option from the "Install Parameters" page and do not try to install resources in any per-machine location.

If you want to let the user choose to either install the application "per-user" or "per-machine" you can implement the steps described in the "How do I make the package install per-user or per-machine" tutorial.

All the Advanced Installer videos can be found on our "Videos" page.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tom_kinco
Posts: 12
Joined: Thu Mar 09, 2017 11:25 am

Re: how to avoid the "User Account Control"

Hi,Eusebiu
Thanks for your reply again.
I clearly remembered that yestoday, I chose "Per-machine if user is administrator,per-user otherwise" and the "UAC" not show, but today, I can't remember what I settings have changed. I just updated some files and make the package again, then the "UAC" come out again.
I think there must be something wrong with this tool. Is it because of I just have the "professional" licence?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: how to avoid the "User Account Control"

Hi,

In order for the "Per-machine if user is administrator, per-user otherwise" option to work you need to add the "InstallTypeDlg" dialog and also make sure that you do not add resources in any per-machine location (e.g "Program Files" folders, "HKLM" registry hive, etc.).

However, please keep in mind that if you try to install the application "per-machine" the UAC prompt cannot be avoided. This is automatically prompted by Windows in order to block unauthorized modifications on the machine (e.g. modifications done by a malicious software).

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tom_kinco
Posts: 12
Joined: Thu Mar 09, 2017 11:25 am

Re: how to avoid the "User Account Control"

Hi,Eusebiu
Thanks for your reply.
I chose "Per-machine if user is administrator, per-user otherwise", and I disabled all the "run as administrator" in the shortcuts, then the UAC not happen again.
Maybe in the advanced installer, an option of avoid "UAC" is useful.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: how to avoid the "User Account Control"

You're welcome. I'm glad you got this working.

Thank you fro your suggestion. However, as I mentioned before, the UAC can be avoided only if the package is configured to access per-user locations and resources and not per-machine ones.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”