pascalscript

Change Inno Setup messages from Pascal code

杀马特。学长 韩版系。学妹 提交于 2019-12-23 04:14:22
问题 I need to change ConfirmUninstall , UninstalledMost (just in case), and UninstalledAll specifically from script to set a condition. Something like this: if FileExists(ExpandConstant('{app}\Slash.exe')) then SetupMessage(msgConfirmUninstall) := FmtMessage(SetupMessage(msgConfirmUninstall), ['Dagon Slasher']) else if FileExists(ExpandConstant('{app}\Frank.exe')) then SetupMessage(msgConfirmUninstall) := FmtMessage(SetupMessage(msgConfirmUninstall), ['Dagon Frankenstein']) else SetupMessage

How to get the current process list in windows

可紊 提交于 2019-12-23 03:06:54
问题 I'm trying to show all processes which are currently running on my system. Can any one guide me to do that. 回答1: I would use WMI for this task since WMI can list also 64-bit processes which I think the Windows API way cannot. Here is an example which uses the Win32_Process class to query list of running processes: [Setup] AppName=My Program AppVersion=1.5 DefaultDirName={pf}\My Program [Code] const WM_SETREDRAW = $000B; var ProcessList: TNewListBox; // this is a substitution for missing

Inc function Inno Setup

混江龙づ霸主 提交于 2019-12-23 02:59:10
问题 This may be really simple but when I try to compile a program containing Inc(Count); In Inno Setup I keep getting Unknown identifier 'Inc' I believe this is how you increment integers in Pascal, and am confused on how to proceed here. I am using Inno Setup 5.5.9(a). 回答1: Indeed, the Inc does not work in Ansi version of Inno Setup. It works in Unicode version though. You should not use Ansi version anyway. It's 2016, no application should use legacy encoding anymore. Switch to the Unicode

Code to run after all files are installed

北战南征 提交于 2019-12-23 02:52:55
问题 I got the following little function which I need to call after all files of the [Files] section have been copied procedure DllAfterInstall(platform: Integer); begin if not installDriver(platform) then MsgBox(ExpandConstant('{cm:installDriverFail}'), mbError, MB_OK); end; where installDriver(platform) is an external function to one of my dll's. As soon as I try to call the DllAfterInstall function in the [Run] section like Filename: "{code:DllAfterInstall}"; Parameters: 0; Check: not IsWin64 I

Inno Setup: Check if file exists anywhere in C: drive

浪子不回头ぞ 提交于 2019-12-23 02:32:16
问题 Some questions/solutions I found on here were similar but not quite what I needed. I'm trying to create an installer for a python application I've created for Windows. The installer calls another installer (openscad_installer.exe) and the user has the choice to install that wherever they like (i.e. I don't know the destination and would need to be able to find it) or not to install it at all. I essentially need to check if the openscad.exe file exists (i.e. if it is installed) anywhere on the

Inno Setup: Checking existence of a file in 32-bit System32 (Sysnative) folder

柔情痞子 提交于 2019-12-23 02:29:08
问题 I have a sys file in the System32\Drivers folder called gpiotom.sys (custom sys file). My my application is strictly 32-bit compatible only, so my installer runs in 32-bit mode. My script needs to find if this sys file exists or not. I used the FileExists function explained on the below post but it does not work since it only works for 64-bit application only: InnoSetup (Pascal): FileExists() doesn't find every file Is there any way I can find if my sys file exists or not in a 32-bit mode?

Checking for Windows Server 2003

风格不统一 提交于 2019-12-23 01:54:32
问题 I created theses functions for installing some files on windows server 2003, I want to know if this is the correct way. function IsServer: Boolean; var ver: TWindowsVersion; begin GetWindowsVersionEx(ver); Result := UsingWinNT and (ver.Major = 5) and (ver.Minor >= 2) and Not IsWin64; end; function IsServer64: Boolean; var ver: TWindowsVersion; begin GetWindowsVersionEx(ver); Result := UsingWinNT and (ver.Major = 5) and (ver.Minor >= 2) and IsWin64; end; 回答1: You didn't show us what UsingWinNT

Excludes part of Code section in ssPostInstall step if installation is update in Inno Setup

末鹿安然 提交于 2019-12-23 01:54:31
问题 I try to use same installer for both (fresh installation and update). so if user try to install my application for first time it will run the full installation included MySQL installer as prerequisites, and the part of MySQL installation within [Code] will execute normally. but, if user already installed my application, and the installer is newer version (update), the part of MySQL installation within [Code] shouldn't be execute. So, how to implement exception function for this part of code

Inno Setup - Identify, what tasks correspond to the items of TaskList (to show text on mouse over for certain tasks only)

拟墨画扇 提交于 2019-12-22 17:12:08
问题 So, I have these comtools tasks, which, as you can see, can have a different position in the tasks list, depending on which components were previously chosen. Moreover, they may not exist at all, if the user doesn't wish to install those components. What I need is static text shown, but only when the cursor hovers over the comtools tasks. [Tasks] Name: "acorig"; Description: "ac original"; GroupDescription: "Choose which version of ac to install:"; Flags: exclusive; Components: ac Name:

How to include single quotes in Inno Setup while passing to function?

為{幸葍}努か 提交于 2019-12-22 10:45:30
问题 I have used string in a function as follow. I'm passing a string to a particular function, if that string has single quotes inside middle it's breaking. How to include single quotes in Inno Setup Pascal scripting? TempReadValue(StrArray, 'log4j.appender.testing.File=INSERT INTO emp select Eid,'%K','%L'from DistributionTable whereEname = 'Nails:chino'', LogFileName); When passing to function its taking till %K , after that its breaking. Can anybody guide me how to read/pass entire string till