How to make installation default path to user desktop with Inno Setup - inno-setup

I'm using Inno setup for make a installation to my program.
And I would like to know, how to make the program to be installed in the user desktop by default?
I figured out, I need to use DefaultDirName=.
I need to know, what to write there for install to be on user desktop be default.
Any help?

Use {userdesktop} constant:
[Setup]
DefaultDirName={userdesktop}
You may also consider setting PrivilegesRequired to lowest, as you probably do not need the installer to run with Administrator privileges.
[Setup]
PrivilegesRequired=lowest

Related

Request admin privileges during un-installation

I'm writing some values to HKLM during the installation of my application.
I'm using the PrivilegesRequired=admin flag in my installer, so during the installation, writing to the registry works fine.
However, when I un-install my application, Inno Setup doesn't request admin privileges, so my call to RegDeleteKeyIncludingSubkeys fails.
I would like to ask if it's possible to make it so that Inno Setup requires admin privileges at un-installation as well.
Thank you very much.
Edit: I've read that the uninstaller should contain this information, but for me, it doesn't. I don't even remember how I created the uninstaller...
I found the problem myself:
I forgot to sign the uninstaller.
The Windows Programs & Features uninstaller requires that uninstaller have to be signed.
Once I signed the uninstaller, everything would work as expected.

Inno Setup silent install UAC

I am trying to construct a silent install using Inno Setup. I am using the /SILENT and /VERYSILENT command parameters, and everything works fine, except for the UAC window popping up at the start.
How do I get around this issue?
I have found a few posts loosely mentioning about using SignTool, but other sources have said that this will simply change the UAC box blue with the publisher parameter filled.
Can anyone help here? The scenario is an installer which will be distributed over the internet to update existing software on a machine silently without any user interaction.
To run a setup elevated without the UAC prompt, you need to run it from something that is already elevated. It would defeat the entire point of UAC if programs could elevate without the user controlling access.
Signing the executable does just show the publisher.
The basic idea is to first install a service that runs under the Local System account, and this service will launch your update installers so that updates can bypass UAC, and don't force the end user to run as admin. If you don't want to develop one on your own, there are 3rd party solutions like this:
http://www.autoupdateplus.com/
When your users first install your application, an "updater service" gets installed, and all subsequent updates can be silent.
(We used to use AutoUpdate+, but later decided to roll our own which just downloads the full installer file of our appliation and runs it silently. This wasn't possible with AutoUpdate+, we had to create update packages with the changed files, which turned out to be too much hassle, with too much room for error.)
I have found one solution of it, like If I do the following before Installing my EXE for temporary then on post Installation I revert it. then, I hope my purpose get solved.
[Registry] Root: "HKLM"; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"; ValueType: dword; ValueName: "ConsentPromptBehaviorAdmin"; ValueData: "0x00000000"
You can install it as User Software. Then you have no problems with UAC because it is no system wide software. ProgramData must be stored in User Folders and Registery Settings must be done under CurrentUser.
Not sure if you like to do that.
But anyway. You do not have to take care of UAC. Companies will have a deployment server with elevated rights so silent deployment will not force there a UAC message.
The UAC message is the normal behavier

Inno setup: How do I hide the the Add/Remove entry in the control panel?

I have created an install using Inno Setup.
I'm using Uninstallable=true and everything is fine but I need to get rid of the entry in the Add/remote programs applet.
Is there a magic setting that I don't know about?
Thanks
Look at the CreateUninstallRegKey directive.

Inno Setup questions about environment variables and UAC elevation

I have two problems with INNO Setup?
How do I check if an env. variable exists and has a value? (I'm interested in %VS90COMNTOOLS%)
How do I run the installer with elevated rights? (Display the UAC window and ask for more rights)
Thanks
For 1, you can use the built-in Pascal script and the API function GetEnvironmentVariable() documented via MSDN.
For 2, name your executable Setup.exe, or use the [Setup] section's PrivilegesRequired entry as documented in InnoSetup's FAQ page.

INNO: Disallow "Ignore" when file is in use

I am using Inno Setup for the installer for my windows application. If a user has the application when the installer is run (eg. for an update), the installer will stop when it is unable to replace a file in use, and it allows the user to select whether to Abort, Ignore, or Retry.
I would like it to only allow Abort or Retry and remove the option to Ignore. Does anyone know how this can be done?
Or if this can't be done, how can I make the installer abort if the application is running?
The easy way to detect whether the application is running requires co-operation from the application, so it's best to work this out before you ship your first version. Use Inno Setup's AppMutex setting. There is an example in the Inno Setup knowledge base for setting up a mutex visible in multiple sessions. There is more about AppMutex in Inno Setup's help file.

Resources