pascalscript

Inno Setup Uncheck a task when another task is checked

独自空忆成欢 提交于 2019-11-28 02:17:54
问题 I am trying to intercept the WizardForm.TasksList.OnClickCheck event so that I can uncheck a task when another task is selected. I know that normally radio buttons would be used in this situation, but automatically unchecking one task when another is selected works better here due to the use of multiple hierarchical tasks and the fact that if radio buttons are used, you always have to have one of the two selected when at the top of the task subtree. Redesigning the task hierarchy is not

How to add DLL function into Inno Setup iss file?

落花浮王杯 提交于 2019-11-28 02:16:21
问题 I tried to read sample code for how to load DLL at Inno Setup, but I'm confused. I have one DLL ( ChkArchInfo.dll ) and the contents is simple: extern "C" __declspec(dllexport) bool __stdcall IsARM() { SYSTEM_INFO si; GetNativeSystemInfo(&si); if(PROCESSOR_ARCHITECTURE_ARM == si.wProcessorArchitecture) return true; return false; } I know I need to use [Files] section to load the DLL file. But how to declare this function at .iss to let me use it? BTW, If there any functions in Inno Setup to

Inno Setup - Automatically submitting uninstall prompts

和自甴很熟 提交于 2019-11-28 02:14:54
问题 I want to hide the first and the last message of the unisntaller. This code works with a modified version of inno setup (Inno Setup Ultra 5.5.1.ee2) but does not work well to hide the first message (appears briefly and disappears): function FindWindowEx(Parent, Child: HWND; ClassName, WindowName: PansiChar): HWND; external 'FindWindowExA@user32.dll stdcall'; const BM_CLICK = $00F5; var Timer: TTimer; msg: string; Wnd, WndEx: HWND; procedure OnTimer(Sender: TObject); begin Wnd:=

Inno Setup - Change a task description label's color and have a line break

时光怂恿深爱的人放手 提交于 2019-11-28 02:13:15
问题 [Components] Name: "Slasher"; Description: "Dagon Slasher"; Types: Slasher Full Name: "Frankenstein"; Description: "Dagon Frankenstein"; Types: Frankenstein Full [Types] Name: "Full"; Description: "Dagon Video Tools" Name: "Slasher"; Description: "Dagon Slasher" Name: "Frankenstein"; Description: "Dagon FrankenStein" [Tasks] Name: "Debug"; Description: "Debug. Warning: This will result in a non-functional ""Join in FrankenStein"" button in the Tools Menu."; Components: not Slasher Name: "Vid"

Disable controls based on components selection in Inno Setup

故事扮演 提交于 2019-11-28 02:05:04
问题 I'd like to disable controls on my custom page ( VST2DirPage ) based on selected components. I have tried the condition: if IsComponentSelected('VST64') then begin VST2DirPage.Buttons[0].Enabled := False; VST2DirPage.PromptLabels[0].Enabled := False; VST2DirPage.Edits[0].Enabled := False; end But the elements seems to be always disabled, so it looks like it is not getting the correct values to work properly. Script below: [Types] Name: "full"; Description: "{code:FullInstall}"; Name: "custom"

Load external DLL for uninstall process in Inno Setup

倾然丶 夕夏残阳落幕 提交于 2019-11-28 02:02:59
问题 I'm trying to load VclStylesInno.dll for uninstall form of Inno Setup. Next code is declared in the middle of [Code] section: procedure uLoadVCLStyle(VClStyleFile: String); external 'LoadVCLStyleW@{app}/VclStylesInno.dll stdcall'; but I faced an error An attempt was made to expand the "app" constant before it was initialized What is the best way to load DLL for uninstall process? 回答1: I assume you are getting the error, when starting the installer, not the uninstaller. When the installer is

Inno Setup Simple progress page for Run section

徘徊边缘 提交于 2019-11-28 01:56:27
问题 My installer is very simple, it basically is: Welcome Page Progress Page Final Page The Welcome and Final pages are standard (just one button). At the Progress page I'm installing a bunch of other programs silently. The actual script is installing each program inside the `[Run] section. The problem is that the bar reaches 100% and then stays there. I'm only able to change the message text. What I would like to achieve is to show the progress using Pascal Script (as it may allow me to have

Read bytes from file at desired position with Inno Setup

六眼飞鱼酱① 提交于 2019-11-28 00:32:38
I want to open a 50 MB binary file and read only the last 4 bytes and convert it to string for some purpose. The only way I found to do it now is using LoadStringFromFile , to load the file entirely on the memory then copy that last 4 bytes, however this method is very slow because the binary file is heavy. Is there any better way to do it in Inno Setup script? Update : This is a final working function that I edited from Martin Prikryl's answer function readlast4byte() : AnsiString; var Stream: TFileStream; Buffer: string; Count: Integer; Index: Integer; begin Count := 4; Stream := TFileStream

Inno Setup Pascal Script - Reading UTF-16 file

隐身守侯 提交于 2019-11-28 00:20:16
I have an .inf file exported from Resource Hacker. The file is in UTF-16 LE encoding. EXTRALARGELEGENDSII_INI TEXTFILE "Data.bin" LARGEFONTSLEGENDSII_INI TEXTFILE "Data_2.bin" NORMALLEGENDSII_INI TEXTFILE "Data_3.bin" THEMES_INI TEXTFILE "Data_4.bin" When I load it using the LoadStringFromFile function : procedure LoadResources; var RESOURCE_INFO: AnsiString; begin LoadStringFromFile(ExpandConstant('{tmp}\SKINRESOURCE - INFO.inf'), RESOURCE_INFO); Log(String(RESOURCE_INFO)); end; I am getting this in the Debug Output : E Please tell me how to fix this issue. Thanks in advance. It seems the

How to get the local IP address using Inno Setup

纵饮孤独 提交于 2019-11-27 23:40:24
How can I get user's local IP address using Inno Setup? I thought about using Win32 API GetIpAddrTable , but it is unclear how to make the adjustment. Dos someone have any other way? Or know how to do it? Robert Love It depends on if you want IPv4 address or the IPv6 address. But since you mentioned GetIpAddrTable and it only returns IPv4 addresses, I suspect that is what you wanted. Each machine can have more than one local IP address. So I return them as a TStringList . The machine I tested the following on had 5 IP addresses. Since Inno Setup does not support pointers, I had to do