pascalscript

Inno Setup - Progress bar doesn't show when uninstall

随声附和 提交于 2019-12-05 15:14:08
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 := npbstMarquee; StatusText := UninstallProgressForm.StatusLabel.Caption; UninstallProgressForm

Inno Setup AfterInstall function called for each file

こ雲淡風輕ζ 提交于 2019-12-05 09:46:37
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; Yes, it executes once per each file. The reference says about it (emphasized by me): A BeforeInstall or AfterInstall function for a [Files] section

Compare version strings in Inno Setup

北城以北 提交于 2019-12-05 07:21:24
问题 I'm reading the value of an INF file, now I need to compare it with the installer version, but when I compile I get an error: Unknown identifier: CompareVersion What is wrong? [Code] function GetKeyValue(const AKeyName, AFileName, ADefault: string): string; var I: Integer; KeyPos: Integer; KeyFull: string; FileLines: TArrayOfString; begin Result := ADefault; if LoadStringsFromFile(AFileName, FileLines) then begin KeyFull := AKeyName + '='; for I := 0 to GetArrayLength(FileLines) - 1 do begin

Finding out Inno Setup WizardForm Caption Font Size, Font Name and Font Color and Center the WizardForm Caption

偶尔善良 提交于 2019-12-05 07:09:17
问题 I need to find what is the Font.Color , Font.Size and Font.Name of Inno Setup WizardForm.Caption to get its (It is a String) Extent Point using GetTextExtentPoint32 . Please let me know how can I find the above properties of WizardForm. (Not the System Font Properties). I want to get current Font Information of WizardForm according to the .cjstyles Skin I am using. And I also like to know how to center Wizard Window Title using Pascal Script after knowing those font information. Thanks in

Inno Setup - Animate a control roll out from right in a determinate page

…衆ロ難τιáo~ 提交于 2019-12-04 22:12:57
I am trying to use this code (with InnoCallback DLL library): [Code] var MainPanelAnimated: Boolean; AnimationTimer: LongWord; procedure AnimationTimerProc( H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord); var L: Integer; begin L := WizardForm.MainPanel.Left + ScaleX(5); if L > 0 then begin L := 0; KillTimer(0, AnimationTimer); end; WizardForm.MainPanel.Left := L; end; procedure CurPageChanged(CurPageID: Integer); var HoverTimerCallback: LongWord; begin if WizardForm.OuterNotebook.ActivePage = WizardForm.InnerPage then begin if not MainPanelAnimated then begin HoverTimerCallback

How to check 64/32-bit in Inno setup

别来无恙 提交于 2019-12-04 22:04:49
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(ExpandConstant('{userappdata}\Local\VirtualStore\Program Files (x86)\MY PROJECT'), True, True, True);

Add image into the components list - component description

假如想象 提交于 2019-12-04 21:56:18
I would like to display a little image, when user hovers mouse cursor over a component on the "Select Components" page. For example, I would like to do something like this: I found a half solution here: Long descriptions on Inno Setup components . But I'm missing the image part. Building upon my answer to Long descriptions on Inno Setup components . You will need to copy HoverTimerProc and its supporting functions and global variables. This answer modifies the HoverComponentChanged and InitializeWizard procedures to support the images in addition to description labels. [Files] ... Source: Main

Inno Setup Uninstall some components only

自古美人都是妖i 提交于 2019-12-04 21:15:37
I have a common application -like a media player- for each different retail product that is installed in the same folder i.e. C:\program files\myapp and the different content -like movies- are all installed in the same folder C:\program files\myapp\movies For each separate installation (separate retail product), I just create a shortcut to open the application with the specific content like mediaplayer -f movie1.mp4 , but it can open all other content from the same environment. The problem in my case, is the uninstallation. Inno Setup does not support component selection to uninstall. My

MySQL query in Inno Setup

巧了我就是萌 提交于 2019-12-04 21:11:00
Before knowing about Inno Setup used IzPack to do my installer, due to the need to verify if the port of the service that was about to create was in use, towards a query to the database with the driver jdbc, so if the connection was valid then send a error message to change the port. So this is the way I did before, but I do not know how to do it in Inno Setup: try { Class.forName("com.mysql.jdbc.Driver"); Connection conn = DriverManager.getConnection( "jdbc:mysql://" + server + ":" + port + "/database", "root", password); if (conn.isValid(0)) { error = "A server-type installation already

How to create new About button in Inno Setup?

≯℡__Kan透↙ 提交于 2019-12-04 21:10:28
I want to create a new About button at the bottom left corner of all the pages like wpWelcome , wpSelectTasks , wpInstalling etc; that will show some message if it is clicked. Message should close if user presses "OK". The button should show the full word "About" not like "Abou..." I have checked CodeClasses.iss file in Inno Setup, but I could not understand which piece of code I should copy, which should not. I have already seen these two post: Adding a help button to an InnoSetup wizard page INNO Setup: "About" button position But they are not what I exactly want. So please anyone help.