PDA

Click to See Complete Forum and Search --> : Inno 5 Script and Testing for .Net Framework 2.0


maikeru-sama
Jun 23rd, 2008, 08:09 AM
I found the following thread on this forum discussing Inno scripting to check for .Net Framework 2.0.

Link (http://www.vbforums.com/showthread.php?t=464441)

The very last post by Skyus denotes how to check. If I have the following Inno 5 script I made just using the basic wizard, where would I put Skyus' script in mine:


; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{7BF3220B-BA3B-4D93-97D9-2C1EF1C386C3}
AppName=My Program
AppVerName=My Program 1.5
DefaultDirName=C:\My Program
DefaultGroupName=My Program
AllowNoIcons=yes
LicenseFile=C:\Setup\production\license.txt
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "C:\Setup\production\WindowsApplication1.exe"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\My Program"; Filename: "{app}\WindowsApplication1.exe"
Name: "{commondesktop}\My Program"; Filename: "{app}\WindowsApplication1.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\My Program"; Filename: "{app}\WindowsApplication1.exe"; Tasks: quicklaunchicon

[Run]
Filename: "{app}\WindowsApplication1.exe"; Description: "{cm:LaunchProgram,My Program}"; Flags: nowait postinstall skipifsilent

maikeru-sama
Jun 24th, 2008, 08:49 AM
Please disregard, I was able to figure things out.

Also, in the thread I referenced in the original post, the user wanted to know how to make sure the script was working. Someone told him to try and find a computer where .Net Framework 2.0 was not installed.

All you have to do is change the following line to something you know doesn't exist:
RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v2.0')

I changed mine to:
RegKeyExists(HKLM,'SOFTWARE\Microsoft\.NETFramework\policy\v-1')

After you do that, just step through the code under the "Run" menu and you can see that it works.