pascalscript

Inno Setup: How to watch variables values or write to debug output?

假如想象 提交于 2019-12-03 04:15:49
How can I watch values of variables while debugging in Inno Setup? How can I print something to debug output? Thanks TLama There's currently no debug watch window, but you can simply hover the variable you want to inspect, when the debugger is stopped on a breakpoint. To print something to a debug output, use the Log procedure: procedure InitializeWizard; var Value: Integer; begin Value := 123; Log('The Value is: ' + IntToStr(Value)); end; Here is the result of the hovered Value variable from the previous script sample: And the result of the debug output window after when you step over the Log

How to Translate texts contained in MsgBox in Inno Setup?

為{幸葍}努か 提交于 2019-12-02 06:17:21
问题 I have got a [code] section contained within my inno setup script which displays some information for the user during install. I would like to be able to translate these in the same language the user selected during install. They texts are currently in English and for example want to translate it in Russian, etc. I know I have to do something in the Language.isl file. Below is a example of such text. if MsgBox('Previous program found. It is recommendeded to uninstall it and install a fresh

InnoSetup, expand environment variable (taken from registry value using {reg:…} )

独自空忆成欢 提交于 2019-12-02 00:28:10
问题 I try to set the default install path from the registry: DefaultDirName={reg:HKCU\Software\Microsoft\VisualStudio\14.0,VisualStudioLocation|{userdocs}\Visual Studio 2015} The directory path that I expect to obtain is the registry value data, which is a value of type REG_EXPAND_SZ then I need to expand its variable(s), the reg value in my case points to the same path as the default value I set, which, once the {userdocs} constant is expanded at runtime by InnoSetup , should be this: C:\Users

InnoSetup, expand environment variable (taken from registry value using {reg:…} )

房东的猫 提交于 2019-12-01 21:13:37
I try to set the default install path from the registry: DefaultDirName={reg:HKCU\Software\Microsoft\VisualStudio\14.0,VisualStudioLocation|{userdocs}\Visual Studio 2015} The directory path that I expect to obtain is the registry value data, which is a value of type REG_EXPAND_SZ then I need to expand its variable(s), the reg value in my case points to the same path as the default value I set, which, once the {userdocs} constant is expanded at runtime by InnoSetup , should be this: C:\Users\Administrator\Documents\Visual Studio 2015 But instead of that i get this as directory path: C:\Users

Inno Setup MsgBox with three buttons and three outcomes

拜拜、爱过 提交于 2019-12-01 19:52:44
I am trying to create a MsgBox with three buttons and three outcomes, but am unable to see how I can create the third outcome? I currently have the following code for a two button MsgBox , which works perfectly: if ((strExistingInstallPath <> '') and (strExistingVersion = '2.5.3')) then begin if SuppressibleMsgBox('Setup has detected that ' + strMyAppName + ' ' + strExistingVersion + '.' + strExistingBuild + ' is installed.' + #13#10 + #13#10 + 'The existing version must be removed before installing or upgrading to ' + strMyAppVersion + '.' + strMyAppBuild + '.' + #13#10 + #13#10 + 'Would you

Inno Setup - Pascal code visibility - “Unknown identifier” error

落花浮王杯 提交于 2019-12-01 13:46:10
I have a file in my installer with an AfterInstall action like so: AfterInstall: UpdateImageLoaderConfigValues() And I would like the procedure to call the same Pascal Script function twice as I can't have two AfterInstall actions as far as I am aware, so I have set this up like so: procedure UpdateImageLoaderConfigValues(); begin SaveValueToXML(ExpandConstant('{app}\ImageLoader.exe.config'),{#ImageLoaderLastConfigurationPath}, ExpandConstant('{app}/Configurations')) SaveValueToXML(ExpandConstant('{app}\ImageLoader.exe.config'),{#ImageLoaderLastImagePath}, ExpandConstant('{app}/Images')) end;

How to get path of installation of target game/application from registry when installing mod/plugin using Inno Setup?

有些话、适合烂在心里 提交于 2019-12-01 13:34:22
I would like to create installer for mod of the game. And I need to detect where is installed the game. I know where is path of the game in registry. But the game can be in another launchers - Steam, GOG. How to detect in order? For example: If I have steam version need to detect path of installation from registry for steam If I have GOG version need to detect path of installation from registry for GOG If I have both versions (Steam and GOG) then default path of installation will be for steam version If I don't have any versions then user own choose destination Registry keys: Steam: [HKEY

InnoSetup, change the Uninstallable property behavior at runtime?

不想你离开。 提交于 2019-12-01 13:05:58
SCENARIO I have created an installer that will installs a Malware application for educative purposes, the installer contains these two tasks: [Tasks] Name: hidden; Description: Hidden mode; GroupDescription: Installation Mode Name: visible; Description: Visible mode; GroupDescription: Installation Mode This means, performs a hidden installation for the user (hidden dirs and files and make uninstallabe the installer), or a visible installation (normal dirs and files and Uninstallable=True). PROBLEM I've set the Uninstallable=True by default, but If the user selects the hidden task then I would

Inno Setup custom page with multiple destination folders that behave like the normal folder select page

主宰稳场 提交于 2019-12-01 12:00:01
问题 I've the following code (taken from Use two/multiple selected directories from custom page in Files section): [Code] var DirPage: TInputDirWizardPage; function GetDir(Param: String): String; begin Result := DirPage.Values[StrToInt(Param)]; end; procedure InitializeWizard; var S1, S2: String; begin S1 := SetupMessage(msgSelectDirDesc); StringChangeEx(S1, '[name]', 'ProgramName', false); S2 := SetupMessage(msgSelectDirLabel3); StringChangeEx(S2, '[name]', 'ProgramName', false); { create a

Inno Setup - Get a path to parent folder

China☆狼群 提交于 2019-12-01 11:56:51
I need to get the parent folder of {app} . It's standard if the end user didn't change the default, but if he did, it becomes a little more problematic. Basically, I need a function, that will output everything till the last \ backslash (inclusive). Wanted to try Pos , but it only detects the first instance of the character. Use the ExtractFilePath function : Extracts the drive and directory parts of the given file name. The resulting string is the leftmost characters of FileName, up to and including the colon or backslash that separates the path information from the name and extension. The