Questions tagged [pascalscript]

Free scripting engine that allows you to use most of the Object Pascal language within Delphi or Free Pascal projects at runtime.

Pascal script is a script engine developed by RemObjects. It uses the object pascal language and can be implemented in Delphi or FPC project.

One prominent use of Pascal Script is the Open Source project.

971 questions
40
votes
1 answer

Inno Setup: How to watch variables values or write to debug output?

How can I watch values of variables while debugging in Inno Setup? How can I print something to debug output? Thanks
Timofei Davydik
  • 7,244
  • 7
  • 33
  • 59
33
votes
2 answers

Make Inno Setup installer request privileges elevation only when needed

Inno Setup installer has the PrivilegesRequired directive that can be used to control, if privileges elevation is required, when installer is starting. I want my installer to work even for non-admin users (no problem about installing my app to user…
Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
21
votes
3 answers

Inno Setup doesn't allow access to all registry keys, why?

I use this code to know if a key exists or not: if RegKeyExists(HKEY_LOCAL_MACHINE, 'Software\Autodesk') then begin MsgBox('Key exists!!', mbInformation, MB_OK); end; for this example, it works, I have the message box, but with this it…
John Lev
  • 211
  • 1
  • 2
  • 6
20
votes
2 answers

InnoSetup: Getting AppName in [Code] section

I'm creating an installer using InnoSetup, and writing some custom handlers in a [Code] section. In one of the handlers, I would like to be able to retrieve the value of the AppName (or, potentially, the value of other parameters) defined in the…
Brian Campbell
  • 322,767
  • 57
  • 360
  • 340
18
votes
1 answer

Proper structure syntax for Delphi/Pascal if then begin end and ;

It has been around 20 years since I last had to write in Pascal. I can't seem to use the structure elements of the language correctly where I am nesting if then blocks using begin and end. For example this gets me an Compiler Error "Identifier…
amalgamate
  • 2,200
  • 5
  • 22
  • 44
18
votes
1 answer

Inno Setup: How to pass variable from [Code] to [Run] (or other section)

How can I pass a variable from [Code] section to parameters in [Run] section in Inno Setup? Basically, I want to do the following. Get and save user input to a variable in a procedure InitializeWizard. Pass the user input to an executable in [Run]…
wcc
  • 183
  • 1
  • 1
  • 4
17
votes
2 answers

Convert Boolean to String with Inno Setup

What is the easiest way to convert a Boolean value into a String in an Inno Setup Pascal script? This trivial task that should be completely implicit seems to require a full-blown if/else construction. function IsDowngradeUninstall: Boolean; begin …
ygoe
  • 18,655
  • 23
  • 113
  • 210
16
votes
5 answers

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

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…
Christian Kuetbach
  • 15,850
  • 5
  • 43
  • 79
16
votes
6 answers

Exit from Inno Setup installation from [Code]

Is it possible to exit the installation from a function in the [Code] section of an installer created with Inno Setup? I'm not interested in setting the exit code, what I want to do is perform a custom check for a requirement, and exit the…
Matheus
  • 161
  • 1
  • 1
  • 3
14
votes
1 answer

LoadStringFromFile and StringChangeEx from Unicode Inno Setup (Ansi file)

I'm trying to update one of my scripts to use the Unicode version of Inno Setup. Unfortunately I'm running into a problem where StringChangeEx is expecting to see a unicode String instead of the AnsiString that I need (mismatched type). Is there an…
user477276
  • 367
  • 5
  • 20
14
votes
1 answer

How to show a hyperlink in Inno Setup?

I'm making a validation in my Inno Setup installer to check whether or not a Microsoft update is installed on the machine, if not, I'm showing a simple message box telling the user that the update is required, this is the message code: MsgBox( …
Vic
  • 2,878
  • 4
  • 36
  • 55
13
votes
4 answers

How can I add a check box for optional files during install in Inno Setup?

I'm trying to make a custom checkbox in my custom page (because it's a one page installer), is needed only a checkbox without dialogs or anything, the installer that I'm trying to compile is very linear and simple. I want to bind FILE3.EXE on a…
ApprenticeGeek
  • 177
  • 1
  • 1
  • 7
12
votes
2 answers

How to get the local IP address using Inno Setup

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?
Toda Raba
  • 614
  • 1
  • 10
  • 25
12
votes
4 answers

How to split a string in Inno Setup

How can I split a string in Inno Setup? Is there any special function in Inno Setup to split the string? I want to get the following from the string '11.2.0.16': tokens: array of string = ('11', '0', '2', '16'); Thanks in advance!
srikanth1267
  • 123
  • 1
  • 1
  • 7
12
votes
1 answer

Replace a text in a file with Inno Setup

Hi I have a problem with replacing a text in a textfile with Inno Setup (Delphi based). My Code: procedure FileReplaceString(const FileName, searchstring, replacestring: string); var fs: TFileStream; S: string; begin fs := …
user3025417
  • 395
  • 1
  • 5
  • 17
1
2 3
64 65