pascalscript

Retrieve strong name of .NET assembly in Inno Setup

谁都会走 提交于 2019-12-07 18:43:49
问题 I need to install these some DLL files to the GAC. I use preprocessor to generate [Files] section entries for these DLLs. And I need to provide a value for the StrongAssemblyName parameter. So question Can I automatically retrieve the StrongAssemblyName of a DLL from a Pascal Script? If not, can one create a dictionary so I could look up in the dictionary using the assembly name as key, and then have hardcoded value strings that would get used when automatically building up the line Source:

How to determine with certainty if an appliction is running before InnoSetup install script is executed

拥有回忆 提交于 2019-12-07 12:39:26
I have an install script with Pascal code to determine if the app to be installed is currently running: ; Script generated by the Inno Setup Script Wizard. ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! [Setup] AppName=MyApp AppVerName=MyApp v1.0 DiskSpanning=no AppPublisher=me AppPublisherURL=http://www.example.com AppSupportURL=http://www.example.com AppUpdatesURL=http://www.example.com DefaultDirName={pf}\MyApp UsePreviousAppDir=yes DefaultGroupName=MyApp OutputBaseFilename=Setup OutputDir=.\MyAppSetup MinVersion=5.0 [Tasks] Name: desktopicon; Description: Create a

Inno Setup AfterInstall function called for each file

半城伤御伤魂 提交于 2019-12-07 03:35:51
问题 I want to call a function after installing a folder, but the InstallEnv function is seems to be called several times, maybe for each file is the folder (to be confirmed). Is there a way to call it only once after it installed all of those files? I can't use the Run section because I want to do error catching with the return code. Source: "InputFiles\virtualenv-1.8.2\*"; DestDir: "{tmp}/virtualenv"; \ Flags: recursesubdirs; AfterInstall: InstallEnv; 回答1: Yes, it executes once per each file.

How to get the current process list in windows

独自空忆成欢 提交于 2019-12-06 21:46:31
I'm trying to show all processes which are currently running on my system. Can any one guide me to do that. 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 BeginUpdate method // of TStrings class procedure WinControlBeginUpdate(Control: TWinControl); begin SendMessage

Inno Setup event that is generated when folder is browsed on TInputDirWizardPage?

孤街浪徒 提交于 2019-12-06 21:36:28
I'm using a custom TInputDirWizardPage to input three different target folders for my installation. When the first folder is changed, I'd like to automatically change the 3rd folder's path. Is it possible to create an event that occurs when the Browse button is used for the first folder and a specific folder is selected? If so, is it also possible to change the 3rd folder's path programmatically? You can override TInputDirWizardPage.Buttons[0].OnClick event handler: var DirPage: TInputDirWizardPage; PrevFirstButtonClick: TNotifyEvent; procedure FirstButtonClick(Sender: TObject); var PrevValue:

Search subdirectories for Inno Setup DestDir

假装没事ソ 提交于 2019-12-06 16:54:35
I am attempting to use Inno Setup to distribute a file used as a plug-in by another application. If it cannot find the plug-in destination, it should still install itself into the Program Files directory, providing the user with manual instructions. Hats off to Tlama for providing some code that was used in a similar problem: Inno Setup find subfolder . The follow script lays out the basic setup I am hoping to achieve, with comment where the script is incomplete. I'm just in over my head. :-) How to pass the found directory back to StampTargetDir (currently just a MsgBox) How to search all

Inc function Inno Setup

对着背影说爱祢 提交于 2019-12-06 16:41:16
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). 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 version. If you have a very good reason to stick with Ansi version (like lots of Pascal code that works with

Downloading file with Inno Setup only when user chooses to

隐身守侯 提交于 2019-12-06 15:46:58
Question: I’d like to know how to script to download a second file which is a zip but initially give a choice between two zip files; download, unzip and delete the zip. The zip files each have different names but the contents have a different name to the zips (each the same name); no renaming required. This question is a little similar to Apply Download file condition in inno-setup The files in question are downloaded via the SourceForge website. The programs (clones) these files are intended for are either not listed on SF or have changed purpose. After fixing the PChar bug: InnoTools

Skip Preparing to Install Wizard page in Inno Setup

梦想与她 提交于 2019-12-06 15:02:17
Referring to the question Basic or Advanced installation mode choice to skip or use advanced options pages , I need to skip the Preparing to Install wizard page now. In my case this page is displayed because one or more programs are using files that need to be replaced by the installer; so the installer asks to the user if they want the setup to automatically close the applications and restart at the end of the setup. I need that this page is hide from the setup process in Basic mode, and if some files are used, that the setup automatically closes the applications using them without asking

Code to run after all files are installed

会有一股神秘感。 提交于 2019-12-06 14:53:33
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 got the error Invalid prototype for 'DllAfterInstall' So can anyone tell me what I'm doing wrong? Or