pascalscript

Inno Setup Uninstall some components only

微笑、不失礼 提交于 2019-12-22 01:43:24
问题 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

Inno Setup Uninstall some components only

假装没事ソ 提交于 2019-12-22 01:43:05
问题 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

MySQL query in Inno Setup

与世无争的帅哥 提交于 2019-12-22 01:36:43
问题 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 +

How to create new About button in Inno Setup?

半城伤御伤魂 提交于 2019-12-22 00:59:44
问题 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

List all physical printers using WMI query in Inno Setup

為{幸葍}努か 提交于 2019-12-22 00:45:32
问题 I'm trying to get the list of physical printer's name, that are connected to Windows, based on an answer from Query available RAM in Inno Setup. But just get: "Send To OneNote 16". Here is my query: Query := 'SELECT Name FROM Win32_Printer'; Printer := WbemQuery(WbemServices, Query); if not VarIsNull(Printer) then begin Log(Format('Printers=%s', [Printer.Name])); end; 回答1: You have to iterate the result set: var Query: string; WbemLocator, WbemServices, WbemObjectSet: Variant; Printer:

Inno Setup: Disable already installed components on upgrade

狂风中的少年 提交于 2019-12-21 23:50:57
问题 We have actually a setup who has many components choice during install and we want to disable component already installed (or make it grey / fixed) when customer reinstall our software. For example during first install we have 3 component like this: Component * International * French * German During first install, all components can be selected. Recognize that chooses the "German" pack, when user make a reinstall of product (with the same installer) to get a new language pack, we want to have

Inno Setup refresh desktop

旧时模样 提交于 2019-12-21 22:35:26
问题 Is it possible to refresh the desktop using Inno Setup in the [Code] section? Either by using SendMessage or somehow use SHChangeNotify ? 回答1: You can call any function in the Windows API by calling it in the appropriate DLL. The Pascal DLL syntax is documented here. The documentation of the SHChangeNotify function is found at MSDN as usual. This function is found in Shell32.dll (no surprise!). [Code] const SHCNE_ASSOCCHANGED = $08000000; SHCNF_IDLIST = $00000000; procedure SHChangeNotify

Get Image File Information using MediaInfo library in Inno Setup Pascal Script

陌路散爱 提交于 2019-12-21 21:33:40
问题 I have been trying for more than two days to get JPEG Image and MP4 Video File Information using MediaInfo.DLL in my Pascal Script. But I keep getting error Runtime Error (at 6:366) - Access Violation at address 0042FD23. Read of address 8065241E.' The error mostly points to (at 6:366). I can't think what problem is causing this exception when trying to get Media Information using MediaInfo.DLL. The code I added to my Script: [Files] Source: Lamborghini_Aventador.jpg; DestDir: {tmp}; Flags:

How to determine whether a specific Windows Update package (KB*.msu) is installed using Inno Setup?

*爱你&永不变心* 提交于 2019-12-21 06:19:08
问题 I wonder how to determine whether a specific Windows Update package is installed in the target machine, lets say for example the Windows Update package with name KB2919355 . Exists a built-in feature to check that? If not, what would be the required code to determine it? Maybe messing with registry, or maybe a cleanest and/or secure way? Pseudo-Code: [Setup] ... [Files] Source: {app}\*; DestDir: {app}; Check: IsPackageInstalled('KB2919355') [Code] function IsPackageInstalled(packageName):

Inno Setup - Create a dynamic list of components/types from external source (file or folder contents)

青春壹個敷衍的年華 提交于 2019-12-21 05:51:18
问题 I have a batch file (setting changer) that uses xcopy to list specific files formats in a specific folder, then allows me to type in one of the names and the script uses that name to copy that file to another location. First xcopy creates a copy of the original as a backup ( rolling backup only 1 copy ) then does the file copy (extension is fixed in batch only body of filename needed This works great BUT I would love to try and do this in Inno Setup for a nice clean GUI. I would like to