pascalscript

Inno Setup - Automatically submitting uninstall prompts

China☆狼群 提交于 2019-11-29 08:49:46
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:= FindWindowByWindowName(msg); if Wnd > 0 then begin WndEx:= FindWindowEx(Wnd, 0,'Button', ''); if WndEx > 0 then begin

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

大憨熊 提交于 2019-11-29 08:47:59
[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"; Description: "Install Extra Codecs for Frankenstein"; Flags: unchecked; Components: not Slasher I

Inno Setup - Create User Input Query Page with input length and format limit and use the input

◇◆丶佛笑我妖孽 提交于 2019-11-29 08:47:58
So, as the title says, I want to create a User Input Query Page (that's easy), but then I want the field to reject space character(s) and limit the input to no more than 15 characters (a bit more difficult for me). But then I need to write the input to a file, which I'm also not sure how to do. Here's what my code looks like now: var Page: TInputQueryWizardPage; Procedure InitializeWizard(); Begin Page := CreateInputQueryPage(wpSelectTasks, 'Choose a Profile Name', 'This name will be used as your Profile Name', 'Please specify a name to be used as your Profile Name (make sure it''s unique),

How to add DLL function into Inno Setup iss file?

牧云@^-^@ 提交于 2019-11-29 08:45:24
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 get ARM architectute? ( ProcessorArchitecture doesn't include ARM architectute) Please help me to do....

Inno Setup Simple progress page for Run section

房东的猫 提交于 2019-11-29 08:43:33
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 more flexibility), something like: procedure InitializeWizard; begin ProgressPage.SetProgress(1, 100);

Load external DLL for uninstall process in Inno Setup

吃可爱长大的小学妹 提交于 2019-11-29 08:43:15
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? I assume you are getting the error, when starting the installer, not the uninstaller. When the installer is starting, the {app} is obviously unknown yet. But as you need the import for the uninstaller only, which

Inno Setup Uncheck a task when another task is checked

試著忘記壹切 提交于 2019-11-29 08:42:39
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 feasible in order to maintain consistency, as this is to include two temporary tasks that will be removed in

Disable controls based on components selection in Inno Setup

你说的曾经没有我的故事 提交于 2019-11-29 08:41:23
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"; Description: "{code:CustomInstall}"; Flags: iscustom [Components] Name: "VST64"; Description: "64-bit

Inno Setup: List all file names in an directory

三世轮回 提交于 2019-11-29 07:37:21
Am trying to list all files with names in an directory, but unable to do. Is there any way to list all files with names in an directory? Thanks in advance. TLama The following script shows how to list all files of a specified directory into a TStrings collection (in this example listed in the list box on a custom page): [Code] procedure ListFiles(const Directory: string; Files: TStrings); var FindRec: TFindRec; begin Files.Clear; if FindFirst(ExpandConstant(Directory + '*'), FindRec) then try repeat if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then Files.Add(FindRec.Name); until not

How to check with Inno Setup, if a process is running at a Windows 2008 R2 64bit?

戏子无情 提交于 2019-11-28 23:29:50
I've read the following post. My Code looks exactly the same, but does not work: Inno Setup Checking for running process I copied the example from http://www.vincenzo.net/isxkb/index.php?title=PSVince But the example doesn't work either, even if I change the code like this: [Code] function IsModuleLoaded(modulename: AnsiString): Boolean; external 'IsModuleLoaded@files:psvince.dll stdcall'; The code always returns false (the program is not running, even it is running). Tested at Windows 2008 R2 and Windows 7. In fact I want to check, if the tomcat5.exe is running or not. So I think I can't work