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
4
votes
2 answers

Reading UTF-16 file in Inno Setup Pascal script

I have an .inf file exported from Resource Hacker. The file is in UTF-16 LE encoding. EXTRALARGELEGENDSII_INI TEXTFILE "Data.bin" LARGEFONTSLEGENDSII_INI TEXTFILE "Data_2.bin" NORMALLEGENDSII_INI TEXTFILE "Data_3.bin" THEMES_INI TEXTFILE…
Blueeyes789
  • 543
  • 6
  • 18
4
votes
2 answers

Inno Setup iterate through users in Registry to remove entry for each users Run key

I am looking to find a way to iterate through the users in the Registry i.e. the HKEY_USERS branch of the Registry) in order to remove an entry that might have been created by the application in the user's profile under…
Robert Wigley
  • 1,917
  • 22
  • 42
4
votes
1 answer

Inno Setup Load defaults for custom installation settings from a file (.inf) for silent installation

I have a setup script that allows the user to specify where they would like to install my application. It is in the form of a Pascal script within the [Code] block. var SelectUsersPage: TInputOptionWizardPage; IsUpgrade : Boolean; …
Chris Lynch
  • 335
  • 1
  • 2
  • 14
4
votes
1 answer

Concatenating string and integer fails with "Type mismatch" error

I have the following Inno Setup script, and I'm getting this error on the SaveStringToFile line: Type Mismatch Can anybody spot my mistake? Thank you! var ErrorCode: Integer; begin ShellExec( 'open', 'taskkill.exe', '/f /im procterm.exe',…
tmighty
  • 10,734
  • 21
  • 104
  • 218
4
votes
1 answer

Inno Setup: Reading a file from installer during uninstallation

Using the following code during uninstall BitmapImage := TBitmapImage.Create(InstallTopPanel); BitmapImage.AutoSize := True; BitmapImage.Bitmap.LoadFromFile( ExpandConstant( '{tmp}\WizardSmallImageFile.bmp') ); BitmapImage.Parent :=…
Maverick
  • 1,105
  • 12
  • 41
4
votes
2 answers

Inno Setup ComponentsList OnClick event

I have a list of components for my Inno Setup installer, 19 different options, I want to set the OnClick event for ONE of the components. Is there a way to do this? Or is there a way to check which component triggered the OnClick event if it's set…
B-M
  • 1,231
  • 1
  • 19
  • 41
4
votes
2 answers

Get a path to parent folder in Inno Setup

I need to get the parent folder of {app}. It's standard if the end user didn't change the default, but if he did, it becomes a little more problematic. Basically, I need a function, that will output everything till the last \ backslash (inclusive).…
4
votes
3 answers

Inno Setup - Remove path from PATH environment variable while uninstalling a program

I wrote an Inno Setup script which install a program and update the PATH environment variable with the directory in which the program in installed. I want to update the PATH environment variable, to restore its previous installation status. The…
4
votes
1 answer

How to parse a JSON string in Inno Setup?

I have the following JSON: { "Info": { "User": 2, "String": "foo" } } Unfortunately TLama's Inno JSON Config library doesn't work with JSON strings but only with JSON files. I tried to use JSON string instead of path to JSON…
yuval
  • 2,848
  • 4
  • 31
  • 51
4
votes
1 answer

Function pointers in Inno Setup

Are function pointers supported in Inno Setup? I can't find anything in the documentation. I know Delphi/Pascal supports them and as the Inno Setup scripting engine is based on it, I'm hoping it is supported.
Maltrap
  • 2,620
  • 1
  • 33
  • 32
4
votes
2 answers

How do I minimize my installer in Inno Setup?

I created my own custom minimize button in Inno Setup. I would like to know how to minimize my installer when I click on it. The minimize should be just like the default minimize button on the border of the installer.
yuval
  • 2,848
  • 4
  • 31
  • 51
4
votes
1 answer

Create a hardlink with Inno Setup

I have thousand of own installers that requires a critical dll file for uninstallation step, this dll file sizes about 2 mb then to avoid unnecessary disk space (2mb*100 installers) I would like to store the file once in {cf} then make a hardlink…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
4
votes
1 answer

Check System Architecture in Inno Setup

I am using Inno Setup to create a BootStrapper for My .NET developed project. While using PascalScript, I am facing some problems. But before that, here is the Script I am using to create the BootStrapper #define MyAppName "" #define…
Mahadev
  • 856
  • 1
  • 17
  • 44
4
votes
4 answers

RegEx pattern to limit dashes in these circumstances

Scenario I'm using a 3rd party file renaming software which is written in Delphi and has pascal-script support: http://www.den4b.com/?x=products&product=renamer The application allows the usage of regular expressions to rename files. this means that…
ElektroStudios
  • 19,105
  • 33
  • 200
  • 417
4
votes
1 answer

Code to run after all files are installed with Inno Setup

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 …
Nitro.de
  • 821
  • 10
  • 27