1+ ; Script generated by the Inno Setup Script Wizard.
2+ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+ #define MyAppName " Dev Proxy Beta"
5+ #define MyAppSetupExeName " dev-proxy-installer-win-x64-0.17.0-beta.1"
6+ #define MyAppVersion " 0.17.0-beta.1"
7+ #define MyAppPublisher " Microsoft"
8+ #define MyAppURL " https://aka.ms/devproxy"
9+
10+ [Setup]
11+ ; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
12+ ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
13+ AppId = {{4448FDE7-D519-4009 -AFE2-0C5D0AA9C3D2}
14+ AppName = {#MyAppName }
15+ AppVersion = {#MyAppVersion}
16+ AppPublisher = {#MyAppPublisher}
17+ AppPublisherURL = {#MyAppURL}
18+ AppSupportURL = {#MyAppURL}
19+ AppUpdatesURL = {#MyAppURL}
20+ AppVerName = {#MyAppName } v{#MyAppVersion}
21+ UninstallDisplayIcon = {app} \icon.ico
22+ DefaultDirName = {autopf}\{#MyAppName }
23+ DefaultGroupName = {#MyAppName }
24+ DisableProgramGroupPage = yes
25+ LicenseFile = ..\LICENSE
26+ ; Remove the following line to run in administrative install mode (install for all users.)
27+ PrivilegesRequired = lowest
28+ OutputBaseFilename = {#MyAppSetupExeName}
29+ Compression = lzma
30+ SolidCompression = yes
31+ WizardStyle = modern
32+ OutputDir = .
33+
34+ [Registry]
35+ Root : HKCU; Subkey : " Environment" ; ValueType : expandsz ; ValueName : " Path" ; ValueData : " {olddata};{app} " ; Flags : preservestringtype
36+
37+ [Languages]
38+ Name : " english" ; MessagesFile : " compiler:Default.isl"
39+
40+ [Files]
41+ Source : " .\*" ; DestDir : " {app} " ; Flags : ignoreversion recursesubdirs createallsubdirs ; Excludes: " *.iss"
42+
43+ ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
44+
45+ [UninstallDelete]
46+ Type :files ;Name :" {app} \rootCert.pfx"
47+
48+ [Code]
49+ function UpdatePath (Param: string): string;
50+ var
51+ OrigPath: string;
52+ begin
53+ // Get original PATH value
54+ if not RegQueryStringValue(HKEY_CURRENT_USER, ' Environment' , ' Path' , OrigPath) then
55+ OrigPath := ' ' ;
56+
57+ // If the path is already there, do nothing
58+ if Pos(' ;' + ExpandConstant(' {app}' ) + ' ;' , ' ;' + OrigPath + ' ;' ) > 0 then
59+ Result := OrigPath
60+ else
61+ // Otherwise, add it
62+ Result := OrigPath + ' ;' + ExpandConstant(' {app}' );
63+ end ;
64+
65+ procedure DeinitializeSetup ();
66+ var
67+ OrigPath: string;
68+ begin
69+ OrigPath := UpdatePath(' ' );
70+ // Set the updated path during installation
71+ RegWriteStringValue(HKEY_CURRENT_USER, ' Environment' , ' Path' , OrigPath);
72+ end ;
0 commit comments