pascalscript

Writing 32/64-bit specific registry key at the end of the installation in Inno Setup

你说的曾经没有我的故事 提交于 2019-12-01 11:47:30
I want to create an installer with Inno Setup, my first time using this tool. What I’m trying to do is wrapping an existing installer of an existing software with a more detailed self-made installer (meaning a Setup.exe inside a Setup.exe). What works for me after researching so far is asking the installer (Inno Setup *.exe) to run the included installer (actual software setup). Why do I need another installer wrapped around? Because I want to give it some extra functions. On particular thing is: I want to add a registry-key at the end of my installation, as the last step, fitting for relevant

Iterate SWbemObjectSet in Windows XP and Inno Setup

被刻印的时光 ゝ 提交于 2019-12-01 11:32:52
I have a problem with taking MAC-addresses list in Windows XP from Inno Setup installer. I'm trying to write some code (took it from Get MAC address in Inno Setup ): function GetMacAddressesList(out List: Array of String): Integer; var I: Integer; WQLQuery: string; WbemLocator: Variant; WbemServices: Variant; WbemObject: Variant; WbemObjectSet: Variant; begin Result := 0; WbemLocator := CreateOleObject('WbemScripting.SWbemLocator'); WbemServices := WbemLocator.ConnectServer('localhost', 'root\cimv2'); WQLQuery := 'Select * from Win32_NetworkAdapterConfiguration where IPEnabled=true';

How to read multiple XML nodes? (Inno Setup)

心不动则不痛 提交于 2019-12-01 10:57:15
问题 This is the XML that I want to read. I have nodes with the same name. I want to access the nodes to show countries on a combo box and currencies on a list box. This how XML looks like: <listaPaises> <item> <id>1</id> <name>MÉXICO</name> <suggestedCurrency>PESO MEXICANO</suggestedCurrency> </item> <item> <id>4</id> <name>ARGENTINA</name> <suggestedCurrency>PESO ARGENTINO</suggestedCurrency> </item> <item> <id>23</id> <name>BELICE</name> <suggestedCurrency>DÓLAR BELICEÑO</suggestedCurrency> <

Run installation using Inno Setup silently without any Next button or Install button

為{幸葍}努か 提交于 2019-12-01 10:54:17
I want my installation should be silent without any Next or Install buttons clicked by the user. I tried to disable all pages still, I am getting the "Ready to Install" page. I want avoid this install page. To run an installer built in Inno Setup without any interaction with the user or even without any window, use the /SILENT or /VERYSILENT command-line parameters : Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not

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

瘦欲@ 提交于 2019-12-01 10:24:52
问题 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

How do I uninstall related products in Inno Setup using an InstallShield Upgrade Code GUID

帅比萌擦擦* 提交于 2019-12-01 10:12:27
Our company has switched from using InstallShield Express to using Inno Setup (5.5.2 version). We've got years of old installs utilizing InstallShield, but have always relied on InstallShield's Upgrade Code GUID to handle the uninstall of the previous version. I need to be able to uninstall any previous InstallShield installed version from our new Inno Setup installer. After some research it looks like I need to call MsiEnumRelatedProducts() and then uninstall any found products. I found this link http://www.microsofttranslator.com/bv.aspx?from=de&to=en&a=http%3A%2F%2Fwww.inno-setup.de

Run installation using Inno Setup silently without any Next button or Install button

扶醉桌前 提交于 2019-12-01 09:42:04
问题 I want my installation should be silent without any Next or Install buttons clicked by the user. I tried to disable all pages still, I am getting the "Ready to Install" page. I want avoid this install page. 回答1: To run an installer built in Inno Setup without any interaction with the user or even without any window, use the /SILENT or /VERYSILENT command-line parameters: Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed

Inno Setup CreateOleObject('IISNamespace') throws exception on Windows Server 2012

喜欢而已 提交于 2019-12-01 09:29:20
I am trying to create IISSetup in the Windows Server 2012 (IIS version 8.5) through the below install script but throws error "Invalid class string". code: var IIS, WebSite, WebServer, WebRoot, VDir: Variant; ErrorCode: Integer; begin { Create the main IIS COM Automation object } try IIS := CreateOleObject('IISNamespace'); except RaiseException( 'Please install Microsoft IIS first.'#13#13'(Error ''' + GetExceptionMessage + ''' occurred)'); end; end; complete_stranger I had the same issue on a Windows Server 2008 R2 Enterprise with Service Pack 1. procedure TForm1.Button1Click(Sender: TObject);

How to execute a batch file on uninstall in Inno Setup?

泄露秘密 提交于 2019-12-01 09:04:51
I'm using code from How do you execute command line tools without using batch file in Inno Setup response to execute all my batch files on installation (before, after). No I want to execute them just when user click "YES" to uninstaller , but can't find a way to do it. It executes before the confirmation Here is my code from [Code] section: function InitializeUninstall(): Boolean; var ResultCode : Integer; begin Result := True; Exec(ExpandConstant('{app}\scripts\unset.bat'), '', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); end; Move your code to the CurUninstallStepChanged(usUninstall) .

Can I create my own classes or units in Inno Setup?

断了今生、忘了曾经 提交于 2019-12-01 08:48:18
问题 I would like to know if it's possible in Inno Setup to define my own units or classes - with both fields (just like defining a record) and methods. 回答1: No, you can define only: structures ( record keyword) - fields only, and interfaces ( interface keyword) - abstract methods only - for COM/ActiveX. But you cannot implement classes (fields and methods). The Pascal Script does not even recognize the class keyword. Not even unit s. The Inno Setup Pascal Script is just a single block of code.