Inno setup How to configure Inno Setup to uninstall everything?

I am new to Inno Setup. Stuck on one issue ~ how to configure the uninstall piece to remove all files, folders, subfolders, and even new files/folders etc. created by application (in other words, a 100% removal of the application and associated files). I hunted around here and also on their forum, and came up empty. Can anyone point me to a document, FAQ etc. regarding how to do this? UPDATE Thanks for all the feedback so far (very awesome). So it looks like I can delete everything using the

Inno setup How do I build two different installers from the same script in Inno Setup?

I want to make a "standard" install for external use, but I also want to use the same script and tell it (with a command line param perhaps?) to include another set of files (PDB files for debugging) for our lab installations. (And make a totally different install exe) How can I do this? Is it possible? I don't see how to set this in the [Files] section (conditionally add files based on some value/param) Note – this is not for allowing the user an option DURING the install. I want a build-

Inno setup Problems in deleting a Folder during the uninstallation with Inno Setup

I begin by saying that i am new in using Inno setup and i am sorry if this is a dumb question. I am trying to delete a folder with all it's sub-folders and files during the uninstallation of an application. The specific folder is created in My Documents when the application runes for the first time. For deleting it i am using the "Delltree" function: procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var Ceva: integer; begin case CurUninstallStep of usUninstall:

Inno setup Execute a command after uninstall

I need my uninstall to run a command after it's removed the files it has installed. [UninstallRun] is no use as I understand it runs BEFORE files are removed. I kind of need a "postuninstall" flag. Any suggestions as to how I can accomplish the above?

Inno setup Recursive setting of folder permissions with InnoSetup

I have a folder tree that I copy to C:\ProgramData The software that I am installing (don't blame me for this, I did not architect, write or design it) requires full control for everyone for this data. So I put the following line in [Files] sectionL Source: "C:\ProgramData\PFPS\MapDataServer\*"; DestDir: "C:\ProgramData\PFPS\FalconViewCommand"; Flags: ignoreversion createallsubdirs recursesubdirs; Permissions: everyone-full; Excludes: "*.LDF" yes, this does give everyone full control of each

Inno setup Pascal Scripting: Check if dest directory is empty and only print yes'/no warning if so

I have written a setup. In this setup nothing happens, because I only concentrated on one area: The " wpSelectDir", where the user can choose a directory the setup should be installed in. Now my code snippet should check, if ANYTHING exist in the chosen directory (any other folders, files, etc.). If so, the user gets warned if he still wants to continue, because everything in this directory will be removed then. If the user only created a new empty folder he should not get a warning, because no

Inno setup Why does the wizard form header change when the isxdl plugin downloading page is shown?

I'm using the following lines to change the MainPanel color and WizardSmallBitmapImage image: [Setup] WizardSmallImageFile=MyFile.bmp [Code] procedure InitializeWizard; begin WizardForm.MainPanel.Color := $00FFDBBF; end; In my setup I'm using the isxdl plugin for downloading prerequisites and the problem is that when its downloading progress page is shown, the MainPanel and WizardSmallBitmapImage components change their look back to the default as I've tried to illustrate on this picture:

Inno setup Inno Setup: Finding registry entry

On a command line, the following returns the correct result: REG Query "HKCU\Software\Microsoft\Office" /s /f "MyEntry" How to do it with Inno Setup? That means: How do I start with a certain key and then how can I look into all subfolders to find a certain value? The Code should return the full path. rgds

Inno setup Inno Setup Skip custom page after execution of some scripts

so i am currently trying to modify the setup script, What i was trying to do was after installing i enter in a custom page, this custom page executes 2 scritps(one for creating the database and the other for creating the tables). while this is executing i want to display a custom label,and a continuous progress bar. When the execution finish, i want to go directly to the finish page. I wanto to also remove the next button. Is this possible? For the moment i have the custom page with a constinu

Inno setup Inno Setup give user choice of which application to associate extensions with

I have a setup project which installs three different executables. I want to give users to option of associating multiple file extensions with either one of the exes or none of them. Is this possible, if so how? The code I currently use to associate a single program with a file extension is: [Registry] Root: HKCR; Subkey: "program1\DefaultIcon"; ValueType: string; \ ValueName: ""; ValueData: "{app}\program1.EXE,0" Root: HKCR; Subkey: "program1\shell\open\command"; ValueType: string;

Inno setup Country based download in Inno Setup

I am trying to use Inno Setup for my software. Currently my software is getting over 6000 downloads per day from different Geo. The issue is my software perform differently for each geo, so I have created different exe for each geo. Currently am using the Inno Setup as download manager for my software. Now how can find the user is from which geo and how can I tell my Inno Setup script to download the exe, where is user is from. Currently what I have now: #define MyAppName "" #define MyAppVers

Inno setup Inno Setup: Confirm task (overwrite registry entry after user confirmation)

Currently I have a checkbox on the default options page that causes a set of registry keys to be created if they do not exist yet: [Tasks] ... Name: myUrlHandler; Description: "Register myurl://"; GroupDescription: "Advanced Options:" [Registry] Root: HKCR; Subkey: "myurl"; Flags: createvalueifdoesntexist uninsdeletekeyifempty; Tasks: myUrlHandler ... Now I want to show a confirmation dialog in case these registry keys already exist, whether the user wants to overwrite them. In what method

Inno setup Inno Setup: Check if file exists anywhere in C: drive

Some questions/solutions I found on here were similar but not quite what I needed. I'm trying to create an installer for a Python application I've created for Windows. The installer calls another installer (openscad_installer.exe) and the user has the choice to install that wherever they like (i.e. I don't know the destination and would need to be able to find it) or not to install it at all. I essentially need to check if the openscad.exe file exists (i.e. if it is installed) anywhere on the co

Inno setup Inno Setup Get progress from .NET Framework 4.5 (or higher) installer to update progress bar position

I am currently installing .NET Framework 4.6.2 as a prerequisite in the PrepareToInstall event function so that I can obtain the exit code, set the NeedsReboot status, or abort if installation fails. My code is below and this is all working fine. var PrepareToInstallLabel: TNewStaticText; PrepareToInstallProgressBar: TNewProgressBar; intDotNetResultCode: Integer; CancelWithoutPrompt, AbortInstall: Boolean; function InitializeSetup(): Boolean; begin Result := True; OverwriteDB := Fa

Inno setup How to exit from installation in silent mode based on a check after InitializeSetup

I am trying to do something similar to this. Do a version check after Welcome page is displayed Display a message box (with mbInformation, MB_OK) in case of downgrade and exit This works in UI mode - installer exits. However, in /Silent mode, it shows the message box but goes ahead after clicking the Ok button. Can you please suggest how to achieve similar functionality in silent mode (i.e. gracefully exit the setup)

Inno setup Generating Inno Setup file flags programmatically

Is it possible in Inno Setup to generate the file flags programmatically? My installer source contains a large number of files within a sizeable directory structure. Currently I've minimized the complexity of the script by adding entire folders at a time. This works fine, however, there are numerous files sprinkled throughout the hierarchy that aren't benefiting from compression (e.g. *.jpg) and are significantly increasing the installer build time. Ideally, I'd like to do something like: S

Inno setup How to resize Inno Setup wizard pages?

I already know that wizard pages do not autosize with WizardForm. I change size of WizardForm and insert background image at WizardForm. Like this... If I insert background image at WizardForm.InnerPage, then I get this I want full background image.

Inno setup Inno Setup: Log registry item creation

I can tell Inno Setup (tried with the latest version 5.5.9) to create log file by launching setup.exe /log=<log.txt>. Unfortunately, it does not seem to log creation of registry entries declared in the [Registry] section. How to tell Inno Setup to also log the registry entry creation or reasons why they were not created?

Inno setup Inno Setup - How to run an aplication with admin privileges if the setup is set to PrivilegesRequired=lowest?

I want to run the setup with PrivilegesRequired=lowest. How to set and run an application (dxwebsetup.exe) to install with my setup with Administrator privileges? My code (Inno Setup - Avoid displaying filenames of sub-installers): procedure CurStepChanged(CurStep: TSetupStep); var ProgressPage: TOutputProgressWizardPage; ResultCode: Integer; begin if CurStep = ssInstall then begin if IsComponentSelected('DirectX') then begin ProgressPage := CreateOutputProgressPage('Inst

Inno setup Collect mac adresss in an array an found a specific value in this array

I need your help as I'm a beginner. I'm trying to use the following function to collect in an array the mac addresses of the Client. A specific mac address defined previously should check in the array and then saved in a variable if found. function WbemQuery(WbemServices: Variant; Query: string): Variant; var WbemObjectSet: Variant; begin Result := Null; WbemObjectSet := WbemServices.ExecQuery(Query); if not VarIsNull(WbemObjectSet) and (WbemObjectSet.Count > 0) then begin Res

Inno setup Skip non-existing source files when compiling installer in Inno Setup

In the [Files] section, I have to achieve that by trying to compiling a file that does not exist, the compiler does not fail and follow its course. For example in this code: [Files] Source: "D:\{#pais}\{#modulo}\IMG\image.png"; \ DestDir: "{userdocs}\Qlik\Sense\Content\Default\{#senseAppDir}\IMG\"; \ Flags: ignoreversion If the file image.png doesn't exists, I want the compiler to skip it and continue. Thanks for your time!

Inno setup How to execute a command from a certain directory in Inno Setup script

I have multiple cmd commands which is about installing npm components. I don't want to use batch file for this purpose. How can I execute these commands through Exec function in an Inno Sectum script and I want the installer to wait until these commands get executed? Here are some example commands I wish to execute also they need to be executed on specified directory: npm install forever-monitor npm install ip

Inno setup Why doesn't Inno Setup constant {userdesktop} work in OutputDir directive and how to fix it?

I created Inno Setup script, which works perfectly, but I wanted to change OutputDir to create the output file on my desktop. But instead of creating output file on desktop it was creating subfolder {userdesktop} at the same directory, where script is and output was inside. I found solution so far, but I believe there should be better way. What am I missing? ; these attempts didn't work [Setup] OutputDir={userdesktop} ; some more attampts: OutputDir=userdesktop OutputDir=userdesktop: OutputDir

Inno setup How to override a third-party installation directory with inno setup

I need to install a thirdparty software embedded in a installer named thirdparty-installer.exe and also install my application Instruct.exe. My application will be at c:\MyAPP folder and all my thirdparty files must be at c:\windows\system32 (all files will be thrown there, in the system32 root). I have done the following: #define OutputDirectory_MPP "c:\myAPP" [setup] DefaultDirName=c:\MyAPP DisableDirPage=yes [dirs] Name: {#OutputDirectory_MPP}; Attribs: system [files] Source: &qu

Inno setup Read modified time from one file and use it to set the time for files in a whole directory

In my installer I'm extracting files from archives that don't store time/date attributes, so when they're extracted the last modified date is set to the current date. I would like to set it to the last modified date of the archive file but I can't figure out how. I tried using pieces of the code from here and here but while it didn't give any errors, it didn't work for changing the time. Last modified date would need to be changed for * .* in a folder. Also, where do I need to hook into to dele

Inno setup Call exe in Inno Setup uninstall

I have an issue with the Inno Setup uninstaller. I have a exe file I want to executable to keep track of the installation and uninstallations. The exe is really simple and sends a message to a server. [Files] Source: "Tracker\LocalSandboxInstallTracker.exe"; DestDir: "{app}/Tracker"; Source: "Tracker\LocalSandboxInstallTracker.exe.config"; DestDir: "{app}/Tracker"; Source: "Tracker\Tracker.Client.dll"; DestDir: "{app}/Tracker"; [Run] Filename: "{app}\Tracker\LocalSandboxInstallTracker.exe"; Pa

Inno setup Calling an Inno setup plugin from NSIS

I'm trying to use an Inno setup plugin called webcrtl (a web browser with more features than nsweb). I'm trying to call this dll with the system plugin. The plugin: http://restools.hanzify.org/article.asp?id=90 This is what I'm trying, without success: Page custom Pre Var hCtl_dialog Var browser Function Pre InitPluginsDir File "${BASEDIR}/Plugins/inno_webctrl_v2.1/webctrl.dll" nsDialogs::Create 1018 Pop $hCtl_dialog System::Call "webctrl::NewWebWnd(i $HWNDPARENT, i 10

Inno setup Creating folder for log files for NLog with InnoSetup

I'm having an issue where I need my users to be able to run my application without administrator rights, but at the same time, I need NLog to be able to create it's log files, which it needs administrator rights to create them in the same folder the application is installed in. I'm trying to create a directory under the application directory, named Logs, and give everyone-modify permissions with inno setup. I'm going to set up my NLog config to write to this new Logs folder instead of the appli

Inno setup Inno Setup need foldername of app constant

For a specific setup, i need the foldername (without the path) of the {app} constant with a inno-setup script. So if in the wizard for the 'Select destination folder' the next folder is selected: C:\ProgramFiles\MyAppFolder, i need 'MyAppFolder' in a variable to use in the setup script.

Inno setup Pascal Scripting: Canceling setup before {app} variable is set

I have some declarations at the [Dirs]-section in my Inno Setup file. I use "Inno Setup Compiler" and a normal text editor (Notepad++) for developing. When I cancel the setup before choosing the install directory, the {app} variable is empty for sure. I get this error (which is totally logic): How can I fix that no error occurs after pressing the "Cancel" button and committing that I want to cancel the setup? Internal error: An attempt was made to expand the "app" constant before it was

Inno setup Does InnoSetup support the ExpandConstant function in included files?

The following function used to work well when defined in the main setup script file: function PrevInstallExists: Boolean; var Value: string; UninstallKey: string; begin UninstallKey := 'Software\Microsoft\Windows\CurrentVersion\Uninstall\' + ExpandConstant('{#SetupSetting("AppId")}') + '_is1'; //MsgBox(UninstallKey, mbConfirmation, MB_OK); Result := (RegQueryStringValue(HKLM, UninstallKey, 'UninstallString', Value) or RegQueryStringValue(HKCU, UninstallKey, 'UninstallString',

Inno setup Inno Setup: How can I suppress files-in-use dialog when install silently?

When I run a installer(created by Inno Setup) silently by using /verysilent argument and there is a target file being used by another process, Inno Setup pops up files-in-use dialog saying that An error occurred while trying to replace the existing file: DeleteFile failed; code 5. Access denied. Click Retry to try again, Ignore to skip this file(not recommended), or Abort to cancel installation I want to suppress this dialog and choose Ignore button automatically so that remaining setup proc

Inno setup ShellExecuteEx error 299 when launching installer created with Inno Setup

I use Inno Setup to create my first installer. But when the installer is launched, before having the windows screen asking the permission to execute this file, I get a window with this error: ShellExecuteEx a échoué : code 299 Seule une partie d'une requete ReadProcessMemory ou WriteProcessMemory a été effectuée. English (from WinError.h): ERROR_PARTIAL_COPY - Only part of a ReadProcessMemory or WriteProcessMemory request was completed. And then the installer is launched. But, af

Inno setup Pascal Script Count number of times a string occurs in another string

I want to count how many times a String occurs in another String in Pascal Script like shown in the below example. I've seen the answer to Delphi: count number of times a string occurs in another string, but there is no PosEx function in Pascal Script. MyString := 'Hello World!, Hello World!, Hello World!, Hello World!'; If I count the number of times Hello or World occurs here, the result should be 4. If I count the number of times , (comma) occurs here, the result should be 3. UPDATE Th

Inno setup WinHttpRequest in Inno Setup doesn't send credentials with Authenticate header

Based on some SO question I saw earlier, I'm using WinHttpRequest inside of Inno Setup to make a GET request to a web server (localhost:8000 right now). Minimal code below, the request is to the built-in Django debug server (python manage.py runserver). procedure InitializeWizard(); var WinHttpReq: Variant; url: string; HTTPREQUEST_SETCREDENTIALS_FOR_SERVER: integer; begin url := 'http://localhost:8000/odbc/test/'; HTTPREQUEST_SETCREDENTIALS_FOR_SERVER := 0; WinHttpReq

Inno setup Inno Setup torrent download implementation

I am currently using Inno Download Plugin to download files for my installer, the biggest problem with this is that it fails to download the file correctly. Because of many reasons like bad connection. I would like to add an alternative method to download files, so the user may chose if he want regular way, or a torrent way. I know that I can use aria2c.exe app. Can someone help me with implementing it to the code of inno setup? What I need is to download a 7z file using torrent (aria2.exe) and

Inno setup Inno Setup: Rename existing shortcut

I need to change the name of desktop application shortcut when I publish the next release of the application. I am updating my Inno Setup configuration file and I generated a new shortcut with the new name but the old shortcut is not updated or deleted. Can I use some task or function to do it? This my current configuration for shortcut icon. [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; \ GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked ... [Icons] Name:

Inno setup Java installer temporarily deployed by Inno Setup is included in installation size

I am a beginner using Inno Setup. I am trying to use the above code to make an installer for "MyProgram". As part of the installation the installer needs to check if Java is installed and if not to install it. The problem I am having is that the installer installs "MyProgram" but it also installs "jre-8u151-windows-x64.exe" as part of "MyProgram". So instead of the installation of "MyProgram" being around 10Mb it is 75mB. From what I have read sources loaded to "{tmp} should uninstall automa

Inno setup Make Inno Setup use system32 and/or syswow64 as directed blindly

I need some help with Inno Setup please. My problem is getting it to place "files" and perform "actions" where I want them "BLINDLY". To make a long story short, with but one exception, it seems that every thing I want done to/in the "System32" folder is ending up in/on the "SysWow64" folder. It does not seem to matter how I call it, {sys}, {syswow64}, {sd}\windows\system32, {sd}\windows\syswow64, or in my code section, %systemdrive%\windows\system32, %systemdrive%\windows\syswow64, or Expandc

Inno setup Inno Setup Sometimes Fails to Change File During Installation

During an Inno Setup install I am adding files to a zip archive, see here: Inno Setup Copy Files and Folders to an Existing Zip File. I immediately after adding the files, the archive is renamed by changing the file extension from .zip to .doc. Code used to rename is: RenameFile(ExpandConstant('{app}\MyFile.zip'), expandconstant('{app}\MyFile.doc')) While this used to work well under windows 7 and 8, it has become less reliable and only sometimes works under windows 10. Note, thin

Inno setup Updater created with Inno Setup does not change the application version

I am using Inno Setup to create an application installer (a big file) and an updater, which is just a small file and contains only files which changed since the previous installation/update. This update file also should increase the number of the application version. I followed this document http://www.jrsoftware.org/iskb.php?updateinstall, i.e. I set CreateUninstallRegKey=no and UpdateUninstallLogAppName=no Everything works fine except one thing. The updater does not change the version number

  1    2   3   4   5   6  ... 下一页 最后一页 共 10 页