pascalscript

Convert Inno Setup Pascal Script TColor to HTML hex colour

寵の児 提交于 2019-12-13 12:51:00
问题 Inno Setup Pascal Script has colour variables like clBtnFace , clYellow in Delphi. I like to know how can I convert any of those TColor to HTML hex colour. For example, if I convert clBtnFace to a HTML hex colour, the result should be #497AC2 . And if I convert clYellow to a HTML hex colour, the result should be #FFFF00 . I found many examples for above, but they're for RGB colours. I want to convert TColor to HTML hex colour to use as hex colour in the command line parameters for ImageMagick

Abort installation when dependency fails to install

女生的网名这么多〃 提交于 2019-12-13 12:47:03
问题 I have one .msi file and two prerequisites files. As per my code, the setup will execute main exe file from .msi file after successful installation. But if the previous version of .msi file is already installed, it coming with the option of Repair and Remove . My Run section is running after I uninstalled .msi file and I want to quit the application after it removed msi file or it will not execute the Run section. Can anyone please suggest me some solutions? Here is my Run section: [Run]

Inno Setup: Create application valid for one year

╄→гoц情女王★ 提交于 2019-12-13 08:56:36
问题 I test my software with new code. const MY_EXPIRY_DATE_STR = '20131112'; //Date format: yyyymmdd function InitializeSetup(): Boolean; var ErrorCode: Integer; begin //If current date exceeds MY_EXPIRY_DATE_STR then return false and exit Installer. result := CompareStr(GetDateTimeString('yyyymmdd', #0,#0), MY_EXPIRY_DATE_STR) <= 0; if not result then begin MsgBox('Now it''s forbidden to install this program', mbError, MB_OK); end if (MsgBox('Autocad will compulsory closed,so please save your

How to login in Office 365 from VBScript and browse through sharepoint with pascal script(?)

不想你离开。 提交于 2019-12-13 07:27:17
问题 I'm packing an Access application, This is connecting with a Sharepoint site. I'm using Inno Setup (With Pascal Scripts) for create an install package. So, I found this code for do something similar to that I want, when I run the code seems work fine: Open the browser, goes to Office 365, puts information (account and password), but just in the moment when open the cmd and after few seconds, all closes without finish the process. On Error Resume Next Const PAGE_LOADED = 4 Set objIE =

InnoSetup, How to load a custom text into RTFText

淺唱寂寞╮ 提交于 2019-12-12 23:07:49
问题 I'm trying to store the text of InfoBefore textfile into a variable and then load it into the RTFEditor with a custom font color and backcolor. When I try to load the text from the variable it says "Write-only property" I need a explicit example of how to do this two things together (Store the text in the var, load the text in the RTF with a custom color and backcolor) without complicating the things too much because I don't know Pascal. This is the code: const FontColor: AnsiString = 'cf0';

RegEx pattern to limit dashes in these circumstances

∥☆過路亽.° 提交于 2019-12-12 11:19:26
问题 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 if what I need to do with a filename cannot be accomplished only using one RegEx, then I could use simultaneous various expressions or also a pascal-script code to accommodate the filename until I can properly format the filename for the needs of

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

半城伤御伤魂 提交于 2019-12-12 10:04:57
问题 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

Validate data on custom page when Next button is clicked in Inno Setup

橙三吉。 提交于 2019-12-12 09:57:38
问题 I have managed to get a basic script working to display a wizard (using CreateInputFilePage ) for a user to identify a file location that I use to update some settings in an XML file. However, I would like to perform some basic checking of the input to the file selected rather than simply accepting whatever the user provides. For example displaying a message box if the user attempts to press **Next"* when the content is invalid. I am not entirely sure how to handle events arising from the

Inno Setup - Progress bar doesn't show when uninstall

心不动则不痛 提交于 2019-12-12 09:41:23
问题 I'm using Inno Setup to create my own installer. When user uninstall app I want delete some folder. So I use CurUninstallStepChanged event to delete folder and show "progress bar" with npbstMarquee style (based on Inno Setup: How to handle progress bar on [UninstallDelete] section?). Here is the code: procedure DeleteFolder(); var FindRec: TFindRec; fullPath: string; tmpMsg: string; StatusText: string; deletePath: string; begin { find all and delete } UninstallProgressForm.ProgressBar.Style :

How to check 64/32-bit in Inno setup

我是研究僧i 提交于 2019-12-12 09:28:07
问题 I want to go inside a folder. It will be Program Files (x86) if 64-bit Program Files if 32-bit. How to do that in Inno setup. This is the code I tried (but no luck): procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep); var mres : integer; begin case CurUninstallStep of usPostUninstall: begin mres := MsgBox('Do you want to delete saved games?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2) if mres = IDYES then if ProcessorArchitecture = paIA64 then begin if IsWin64 then DelTree