inno-setup

ShouldSkipPage is called twice per page

社会主义新天地 提交于 2020-05-23 11:12:30
问题 I've noticed, that ShouldSkipPage is called twice per each page - before page is actually shown, and after. You can easily check this, by simply adding Log to function: function ShouldSkipPage(PageID: Integer): Boolean; begin if PageID = wpSelectDir then Log('ShouldSkipPage for SelectDir was called'); Result := false; end; You will see logged message twice (and by executing script in compiler, you can see, that second call occurs after page was shown). So, can someone explain, why it is

Inno Setup - Register for both 32 bit and 64 bit

本小妞迷上赌 提交于 2020-05-23 10:56:30
问题 This issue has only raised itself now that I am registering my file types: ; Register File Types 32 bit Root: HKCR; SubKey: ".mwb"; ValueType: string; ValueData: "MeetingScheduleAssistant.MeetingWorkBook"; Flags: uninsdeletekey Root: HKCR; SubKey: "MeetingScheduleAssistant.MeetingWorkBook"; ValueType: string; ValueData: "Meeting Workbook"; Flags: uninsdeletekey Root: HKCR; SubKey: "MeetingScheduleAssistant.MeetingWorkBook\Shell\Open\Command"; ValueType: string; ValueData: """{app}

Inno Setup - Register for both 32 bit and 64 bit

荒凉一梦 提交于 2020-05-23 10:55:08
问题 This issue has only raised itself now that I am registering my file types: ; Register File Types 32 bit Root: HKCR; SubKey: ".mwb"; ValueType: string; ValueData: "MeetingScheduleAssistant.MeetingWorkBook"; Flags: uninsdeletekey Root: HKCR; SubKey: "MeetingScheduleAssistant.MeetingWorkBook"; ValueType: string; ValueData: "Meeting Workbook"; Flags: uninsdeletekey Root: HKCR; SubKey: "MeetingScheduleAssistant.MeetingWorkBook\Shell\Open\Command"; ValueType: string; ValueData: """{app}

Create desktop link Icon after the Run section of Inno Setup

放肆的年华 提交于 2020-05-14 07:18:40
问题 Overview My install process involves placing over 2GB of data on a disk. So I use Inno Setup, but I run 7ZIP to actually extract/install the files. Issue The issue I have is that it seems the desktop icon is being created before the [Run] section, so there is no icon to set the the desktop link. Is there a way around this? (I have tried both {src} and {app} as the folder to find the icon.) CODE [Run] Filename: "{pf64}\7-zip\7zG.exe"; Parameters: "x ""{src}\GL.7z"" -o""{app}\"" * -r -aoa"; \

Detect and uninstall old version of application in Inno Setup using its version number stored in registry

断了今生、忘了曾经 提交于 2020-05-14 05:19:49
问题 I have an installer that write this line in the Windows registry [Registry] Root: "HKCU"; Subkey: "SOFTWARE\W117GAMER"; ValueType: string; ValueName: "DSVersionL4D2"; ValueData: "{#MyAppVersion}" taking into account that {#MyAppVersion} is defined and written when the program is installed #define MyAppVersion "2.7" I am constantly updating the installer, which is why some people have old installations, and when they update, old files that conflict are combined, so as not to uninstall the

Install external file from subdirectory (relative path) using Inno Setup

心不动则不痛 提交于 2020-05-13 11:44:45
问题 I would like to install an external file. My installer is located in c:\somedir\setup.exe And the external file is located in c:\somedir\download\MyApp.exe My code to do that is [Files] Source:"\download\MyApp.exe"; DestDir: "{app}";Flags: external skipifsourcedoesntexist For some reason, Inno Setup does not seem to find this file. Can anybody tell me what I'm doing wrong? Thank you. 回答1: You have two problems: The path \download\MyApp.exe relative to c:\somedir\ resolves to c:\download\MyApp

Inno Setup - How to display a message after installation is cancelled

耗尽温柔 提交于 2020-05-12 09:05:46
问题 How to display a message after an installation is completely cancelled? 回答1: You can monitor the CurStepChanged. If the last step ever started is the ssInstall and you never get to the ssPostInstall , let only ssDone , the installation was most probably aborted. In that case, display the message in the DeinitializeSetup event function. [Code] var LastStep: TSetupStep; procedure CurStepChanged(CurStep: TSetupStep); begin Log(Format('Step: %d', [CurStep])); LastStep := CurStep; end; procedure

Inno Setup - How to display a message after installation is cancelled

感情迁移 提交于 2020-05-12 09:05:13
问题 How to display a message after an installation is completely cancelled? 回答1: You can monitor the CurStepChanged. If the last step ever started is the ssInstall and you never get to the ssPostInstall , let only ssDone , the installation was most probably aborted. In that case, display the message in the DeinitializeSetup event function. [Code] var LastStep: TSetupStep; procedure CurStepChanged(CurStep: TSetupStep); begin Log(Format('Step: %d', [CurStep])); LastStep := CurStep; end; procedure

How can I copy the installer to the temp file and then run it?

你。 提交于 2020-05-12 09:02:08
问题 I am trying to copy the installer to the temp folder and then run it from that location. This is what I am trying to do, but so far to no avail. FileCopy(ExpandConstant('{srcexe}'), ExpandConstant('{tmp}\Setup.exe'), True); Exec(ExpandConstant('{tmp}\Setup.exe'), '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) How can I copy the installer to the temp file and then run it from the code section? 回答1: No idea why, but there's an explicit check that prevents FileCopy function from copying the

Inno Setup: How to update AppVersion [Setup] value from Config.xml file

喜欢而已 提交于 2020-05-12 07:22:33
问题 I want to update AppVersion value in [Setup] section at compile time from config.xml file by parsing Version tag. Config.xml file has below configuration: <?xml version="1.0" encoding="utf-8"?> <Configuration> <Version>1.0.1</Version> </Configuration> My application is using config.xml file for application version. I also want to use the same version in Inno Setup installer version. I am new in Inno Setup script development. It would be very helpful if someone provide me right approach. 回答1: