inno-setup

Inno Setup - Show custom components on Ready to Install page

会有一股神秘感。 提交于 2020-08-26 08:33:46
问题 i would like to add my components and the selected user from the ini file to the Ready to install page. Is this even possible? It should look like this example: this is my ini file: user1=Program1,Program3 user2=Program1,Program2 user3=Program1,Program3 user4=Program1,Program2 Then the following script will do: [Files] Source: "TEST \Software\x64\Program_1"; DestDir: "{app}\Program_1"; \ Flags: ignoreversion recursesubdirs; Check: ShouldInstallProgram('Program1') Source: "TEST \Software\x64

Read application version from a text file in Inno Setup

时光总嘲笑我的痴心妄想 提交于 2020-08-26 05:32:34
问题 I have a TypeScript file that contains this line: export const version = '0.0.1'; And I want access the value of version and import it to AppVersion in Setup section (iss file) [Setup] AppVersion={....} How can I do it? 回答1: Similarly to Inno Setup: How to update AppVersion [Setup] value from Config.xml file, you can use PowerShell script from preprocessor to parse the version from the file using a regular expression: #define RetrieveVersion(str FileName) \ Local[0] = AddBackslash(GetEnv(

Inno Setup - XML editing XPath request fails with “NIL Interface Exception at runtime”

亡梦爱人 提交于 2020-08-25 07:27:08
问题 I've created a Inno Setup script for my app in which I'm trying to edit some XML configuration in the post install step (mostly connection strings). I have some pretty simple XPath request but I have a runtime exception when using selectSingleNode whereas getElementsByTagName works perfectly fine. This code does not work. It throws "NIL Interface Exception at runtime" . procedure ReadValueFromXML(const AFileName, APath, AAttribute, AValue: string); var XMLNode: Variant; XMLDocument: Variant;

In Inno Setup, how do I center some text in the window?

折月煮酒 提交于 2020-08-24 12:00:26
问题 In Inno Setup, how do I center some text in the window? I tried making it a TLabel and setting the Alignment to taCenter but it didn't have any effect. I can set the Left and Top with no problems. 回答1: The Alignment property controls the horizontal placement of the text within the label. It's not used to position controls within their parent. Except Align property (which stretches controls to given space), there is no way to center controls to their parents. But you can make a function for

Possible to call DLL function in uninstaller if DLL has dontcopy flag?

若如初见. 提交于 2020-08-23 13:02:48
问题 As the title says I need a function in my DLL which I need to call while uninstalling. The DLL is included this way #define myProgData "C:\ProgramData\Foo\Bar" [Files] Source: "mydll.dll"; Flags: dontcopy I already use one function while installing and now I want to know if I can use the same DLL for uninstall or does the DLL have to be copied so the uninstaller can access it? I've tried a simple call already but got the Could not call proc - Exception So I'm looking for the reason for this.

Why can't I import the dll that has a dependency and call a function from it on Uninstall in Inno Setup?

我与影子孤独终老i 提交于 2020-08-19 10:54:07
问题 Here's the code: [Files] Source: "IsStartServer.dll"; DestDir: "{app}" Source: "sqlite3x86.dll"; DestDir: "{app}" [Code] function O4TaskMngrSvcStopAndUninstall: LongBool; external 'CheckO4TaskMngrSvcStopAndUninstall@{app}\IsStartServer.dll,{app}\sqlite3x86.dll stdcall loadwithalteredsearchpath uninstallonly'; procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); begin if CurUninstallStep = usUninstall then begin O4TaskMngrSvcStopAndUninstall(); UnloadDLL(ExpandConstant('{app}

Add Version to SetupWindowTitle of Inno Setup

本秂侑毒 提交于 2020-08-06 06:42:25
问题 The default Title of a Inno Setup Form is Setup - %1 where %1 will be replaced by AppName from [Setup]-Section. I want to add the Version like this Setup - MyProgramm 2.07.5 I've already managed to change the title by adding the [Messages]-Section and define the SetupWindowTitle . But this is fixed and i can't add the version string. [Messages] SetupWindowTitle=Setup - {AppName} {AppVersion} This will result in 回答1: OK, I've found my mistake. The right syntax is [Messages] SetupWindowTitle

Add Version to SetupWindowTitle of Inno Setup

a 夏天 提交于 2020-08-06 06:42:05
问题 The default Title of a Inno Setup Form is Setup - %1 where %1 will be replaced by AppName from [Setup]-Section. I want to add the Version like this Setup - MyProgramm 2.07.5 I've already managed to change the title by adding the [Messages]-Section and define the SetupWindowTitle . But this is fixed and i can't add the version string. [Messages] SetupWindowTitle=Setup - {AppName} {AppVersion} This will result in 回答1: OK, I've found my mistake. The right syntax is [Messages] SetupWindowTitle

Show progress details (like speed) when installing files with Inno Setup

南楼画角 提交于 2020-08-05 09:51:24
问题 I'm trying to add a dynamic progress bar in my installer. I want to install some programs with my installer. The progress bar literally should show, which program files are currently install right now. It should look like this example: I do try something like this : Inno Setup: How to manipulate progress bar on Run section? [Code] procedure UpdateProgress(Position: Integer); begin WizardForm.ProgressGauge.Position := Position * WizardForm.ProgressGauge.Max div 100; end; But I also want to see

PowerShell script executed from Inno Setup is failing with “Retrieving the COM class factory for component with CLSID {XXXX} failed - error 80040154”

£可爱£侵袭症+ 提交于 2020-08-05 09:50:32
问题 I want to convert a folder to an application with IIS using Inno Setup. I found that I can do it with PowerShell, using ConvertTo-WebApplication 'IIS:\Sites\Default Web Site\MY_APP' I have added this to my Inno Setup script: [Run] Filename: "powershell.exe"; \ Parameters: "-ExecutionPolicy Bypass -Command ConvertTo-WebApplication 'IIS:\Sites\Default Web Site\MY_APP'" \ WorkingDir: {app}; Flags: runhidden But PowerShell is failing with: Retrieving the COM class factory for component with CLSID