inno-setup

Use RestartManager during Uninstall (Inno Setup)

北城以北 提交于 2020-03-15 07:18:06
问题 In Inno Setup, one can use CloseApplication to enable the Windows restart manager, and check for running instances. This, however, does not apply to the uninstallation. The setup removes all files that are not in use, and shows a message along the lines of "not all files could be removed, please remove them manually". The only way to check for running instances that seems to work during uninstall runs, is to use AppMutex. Is there a way to enable the restart manager during the uninstallation

Setting DestDir from Inno Pascal?

我的梦境 提交于 2020-03-01 03:36:46
问题 I want to install files in different folders, depending on whether the user has selected to install for all users or just the current user. I have added used CreateInputOptionPage() to create an option page with two radio buttons. However, my installer is now littered with lots of duplicate lines, like these two: Source: {#ProjectRootFolder}\License.txt; DestDir: {userdocs}\{#MyAppName}; Check: NOT IsAllUsers Source: {#ProjectRootFolder}\License.txt; DestDir: {commondocs}\{#MyAppName}; Check

Workaround for 'Apps & features' in Windows 10 starting a single-user uninstaller elevated

眉间皱痕 提交于 2020-02-29 05:24:18
问题 When users try to uninstall their own single user installation (for example installed using lowestprivileges none and HKCU entries ) with 'Add/Remove Programs' in the Control Panel, everything works fine (that is, non-admin users can uninstall their own non-admin installation). However the uninstaller will be elevated, when users start it from 'Apps & features' (Windows 10). This seems to be a known Windows 10 bug: How to prevent uninstaller elevating for Standard Windows 10 user? Is there a

How to call an exe when Inno Setup installation fails (within the installer itself)?

别来无恙 提交于 2020-02-28 11:01:31
问题 I've been using Inno Setup for several months now, but I'm struggling to find how to detect, from within the installer itself, an error that would cause Inno Setup to end with a non-zero exit code. I've thought about using CurStepChanged with the ssDone step, or even DeinitializeSetup , but I can't find how to get access to the wizard's exit-code. Did I miss something? There must be a way to do it... 回答1: You cannot find out installer exit code from the Pascal Scripting. If you want to detect

How to call an exe when Inno Setup installation fails (within the installer itself)?

匆匆过客 提交于 2020-02-28 11:01:06
问题 I've been using Inno Setup for several months now, but I'm struggling to find how to detect, from within the installer itself, an error that would cause Inno Setup to end with a non-zero exit code. I've thought about using CurStepChanged with the ssDone step, or even DeinitializeSetup , but I can't find how to get access to the wizard's exit-code. Did I miss something? There must be a way to do it... 回答1: You cannot find out installer exit code from the Pascal Scripting. If you want to detect

Uninstaller trouble with standard Windows user

半腔热情 提交于 2020-02-22 19:07:12
问题 I am wondering if I am encountering the same bug with Windows 10 discussed in this post. I am having a problem with uninstalling a program installed by a standard user without elevation. I am using INNO Setup, so I have PrivilegesRequired=lowest, and INNO does not prompt for elevated privilege, and installs for the current user, and creates an uninstaller, e.g. uninst000.exe, in my application folder, and I have INNO put an icon for the uninstaller in a Start Menu group for my app (all this

Using Process Exit code to show error message for a specific File in [Run]

跟風遠走 提交于 2020-01-27 20:54:06
问题 Using innosetup and want to show error/msgbox if one of the [RUN] process does not return process code 0. I'm using it for authorization process, if authorization is not successful, i want to notify the user. I have following: Filename: "{pf32}\Common Files\Authorization.exe"; Parameters: " "{code:GetAuthorizationFilePath}" /s"; WorkingDir: "{tmp}"; Flags: skipifdoesntexist hidewizard; StatusMsg: "Authorizing License"; Returns me: Process exit code:0 0 of course is successful, but if its not

inno setup 5 ini4j strips backslash

試著忘記壹切 提交于 2020-01-26 02:19:46
问题 I use Inno Setup 5 to create an ini file with {app} as the destination: [INI] Filename: "{userdocs}\JavaCppDemo.ini"; Section: "InstallSettings"; Flags: uninsdeletesection Filename: "{userdocs}\JavaCppDemo.ini"; Section: "InstallSettings"; Key: "InstallPath"; String: "{app}" Then I use ini4j to get the value of InstallPath: String DefaultFolder = new FileChooser().getFileSystemView().getDefaultDirectory().toString(); // tricky way of getting at user/documents folder String strFileName =

Adding a node to an existing XML file using inno setup

本小妞迷上赌 提交于 2020-01-25 10:52:06
问题 In my inno setup script there is a [code] section and I need to add some code to: Open an xml file then add a single node in a specific place Save the file back to the hard drive I need to be able to edit a file called config.xml in \documents\docotype in the file there is some code like this: <References> <ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <string>System.dll</string> <string>System.Core.dll</string> <string