pascalscript

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

我是研究僧i 提交于 2019-12-30 10:37:35
问题 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; 回答1: I had the same issue on a Windows

Is it possible to allow a user to skip a TInputDirWizardPage in Inno Setup?

白昼怎懂夜的黑 提交于 2019-12-30 09:46:33
问题 I have an installer using Inno Setup that allows the user to select a file location, at install time. The file is kind of like an answers file to help with installation. For this prompt, I'm using the TInputDirWizardPage. It works fine when the user is using this file, but if he doesn't wish to, it automatically throws an error telling him that he must enter a path. Is there a way to NOT force validation so that the user can just hit next and let me figure out that he doesn't have a file? 回答1

Inno Setup: OnHover event

旧巷老猫 提交于 2019-12-29 08:20:11
问题 Is it possible to simulate OnMouseHover event (to call a function when mouse is over some Inno Setup control) for Inno Setup controls, or is there any DLL library which can help? 回答1: You can implement it by: scheduling a very frequent timer (say 50 ms) when the timer is triggered, find a control over which the cursor is positioned and check for changes. The following example displays name of the control with cursor over it on a label, like: [Code] var HoverLabel:TLabel; LastMouse: TPoint;

Check for existence of a shortcut pointing to a specific target in Inno Setup

北城余情 提交于 2019-12-29 01:24:19
问题 In my Inno Setup installer I need to make sure a shortcut to a certain file is present in a folder. The name of the shortcut is arbitrary and not under my control. I only know which file it needs to point to. If the shortcut is missing, I need to generate the shortcut. If it is already present, it must not be created again. I guess that it is somehow possible to iterate through all shortcut files in the relevant folder and check which file they point to. In a comment to an answer to Shared

How to pass the interfaced object to the Pascal Script function call?

两盒软妹~` 提交于 2019-12-23 08:36:32
问题 Delphi part: I have a class with the event and from that event I need to call a procedure passing the interfaced object to it. It works fine in Delphi but I have problems with declaring it in Pascal Script. To the background - the IGPGraphics interface is a part of the Delphi GDI+ library and without methods is defined like this: type IGdiplusBase = interface ['{24A5D3F5-4A9B-42A2-9F60-20825E2740F5}'] IGPGraphics = interface(IGdiPlusBase) ['{57F85BA4-CB01-4466-8441-948D03588F54}'] The

How to pass the interfaced object to the Pascal Script function call?

一曲冷凌霜 提交于 2019-12-23 08:36:05
问题 Delphi part: I have a class with the event and from that event I need to call a procedure passing the interfaced object to it. It works fine in Delphi but I have problems with declaring it in Pascal Script. To the background - the IGPGraphics interface is a part of the Delphi GDI+ library and without methods is defined like this: type IGdiplusBase = interface ['{24A5D3F5-4A9B-42A2-9F60-20825E2740F5}'] IGPGraphics = interface(IGdiPlusBase) ['{57F85BA4-CB01-4466-8441-948D03588F54}'] The

Inno Setup create array from comma delimited strings stored in an array

﹥>﹥吖頭↗ 提交于 2019-12-23 06:12:30
问题 I need to create an array from a number of comma delimited strings which are stored in an array themselves. The master array which contains the list of comma delimited strings is RemoteSiteLines and can contain any number of string entries like 1001,Remote Site 1,REM1,0 , 1002,Remote Site 2,REM2,1 etc. which I need to get into another array RemoteSiteDetailsLines . I am struggling to know even where to start with this and unless I am mistaken there are no built-in functions to do something

Inno Setup create array from comma delimited strings stored in an array

瘦欲@ 提交于 2019-12-23 06:12:19
问题 I need to create an array from a number of comma delimited strings which are stored in an array themselves. The master array which contains the list of comma delimited strings is RemoteSiteLines and can contain any number of string entries like 1001,Remote Site 1,REM1,0 , 1002,Remote Site 2,REM2,1 etc. which I need to get into another array RemoteSiteDetailsLines . I am struggling to know even where to start with this and unless I am mistaken there are no built-in functions to do something

Inno Setup Calling DLL with string as parameter

早过忘川 提交于 2019-12-23 05:14:20
问题 I'm getting a exception when I attempt to use my DLL from the Inno Setup script. I think the problem is this line in the dll code: StreamReader sreader = new StreamReader(newpath); If I hard code the path as @"D:\source.txt" , it doesn't crash. What should the string, representing the path to the source.txt file, look like when passed as an argument from the script? DLL code: using RGiesecke.DllExport; using System.Runtime.InteropServices; using Microsoft.Win32; using System.IO; using System;

Are global variables in Pascal Script zero-initialized?

 ̄綄美尐妖づ 提交于 2019-12-23 05:07:35
问题 When I declare a global variable in [Code] section (Pascal Script) of Inno Setup script, is it automatically initialized to zero/empty value? Or do I have to explicitly initialize it (e.g. in InitializeSetup event function)? var GlobalNumber: Integer; function InitializeSetup(): Boolean; begin { Is this necessary? } GlobalNumber := 0; Result := True; end; From my experience, the variables are zero-initialized. Though, I'm not sure if I just have not been lucky. I've done 10.000 iterations of