mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-11-27 10:00:57 +00:00
Refactor installer components and registry handling
Renamed 'downloadtools' and 'winservice' components to 'addtools' in setup.iss and updated related registry and icon entries to use the new component. Registry entries for script execution are now conditional on the 'addtools' component. Removed unnecessary 'pause' from uninstallService.bat for streamlined service removal.
This commit is contained in:
parent
4e25e13f35
commit
0dec23bc65
23
setup.iss
23
setup.iss
|
|
@ -30,19 +30,14 @@ ChangesAssociations=yes
|
||||||
[Components]
|
[Components]
|
||||||
; Add an optional component for the user to select during installation
|
; Add an optional component for the user to select during installation
|
||||||
Name: "fileassoc"; Description: "Associate .js files to run with WelsonJS"; Types: full compact custom;
|
Name: "fileassoc"; Description: "Associate .js files to run with WelsonJS"; Types: full compact custom;
|
||||||
Name: "winservice"; Description: "Install the Windows Service module for WelsonJS"; Types: full;
|
Name: "addtools"; Description: "Download additional tools for WelsonJS"; Types: full;
|
||||||
Name: "downloadtools"; Description: "Download additional tools for WelsonJS"; Types: full;
|
|
||||||
|
|
||||||
[Registry]
|
[Registry]
|
||||||
; Root: HKCR; Subkey: "welsonjs"; ValueType: "string"; ValueData: "URL:{cm:AppName}"; Flags: uninsdeletekey
|
|
||||||
; Root: HKCR; Subkey: "welsonjs"; ValueType: "string"; ValueName: "URL Protocol"; ValueData: ""
|
|
||||||
; Root: HKCR; Subkey: "welsonjs\DefaultIcon"; ValueType: "string"; ValueData: "{app}\app\favicon.ico,0"
|
|
||||||
; Root: HKCR; Subkey: "welsonjs\shell\open\command"; ValueType: "string"; ValueData: "cscript ""{app}\app.js"" uriloader ""%1"""
|
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script"; ValueType: string; ValueData: "{cm:AppName} Script"; Flags: uninsdeletekey
|
Root: HKCR; Subkey: "{cm:AppName}.Script"; ValueType: string; ValueData: "{cm:AppName} Script"; Flags: uninsdeletekey
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script\DefaultIcon"; ValueType: string; ValueData: "{app}\app\favicon.ico,0"; Flags: uninsdeletekey
|
Root: HKCR; Subkey: "{cm:AppName}.Script\DefaultIcon"; ValueType: string; ValueData: "{app}\app\favicon.ico,0"; Flags: uninsdeletekey
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script\shell"; ValueType: string; ValueData: "open"; Flags: uninsdeletevalue
|
Root: HKCR; Subkey: "{cm:AppName}.Script\shell"; ValueType: string; ValueData: "open"; Components: addtools; Flags: uninsdeletevalue
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script\shell\open"; ValueType: string; ValueData: "Run with {cm:AppName}"; Flags: uninsdeletevalue
|
Root: HKCR; Subkey: "{cm:AppName}.Script\shell\open"; ValueType: string; ValueData: "Run with {cm:AppName}"; Components: addtools; Flags: uninsdeletevalue
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script\shell\open\command"; ValueType: string; ValueData: """{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"" --file ""%1"""; Flags: uninsdeletevalue
|
Root: HKCR; Subkey: "{cm:AppName}.Script\shell\open\command"; ValueType: string; ValueData: """{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"" --file ""%1"""; Components: addtools; Flags: uninsdeletevalue
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script\ScriptEngine"; ValueType: string; ValueData: "JScript"; Flags: uninsdeletevalue
|
Root: HKCR; Subkey: "{cm:AppName}.Script\ScriptEngine"; ValueType: string; ValueData: "JScript"; Flags: uninsdeletevalue
|
||||||
Root: HKCR; Subkey: "{cm:AppName}.Script\ScriptHostEncode"; ValueType: string; ValueData: "{{85131630-480C-11D2-B1F9-00C04F86C324}}"; Flags: uninsdeletevalue
|
Root: HKCR; Subkey: "{cm:AppName}.Script\ScriptHostEncode"; ValueType: string; ValueData: "{{85131630-480C-11D2-B1F9-00C04F86C324}}"; Flags: uninsdeletevalue
|
||||||
Root: HKCR; Subkey: ".js"; ValueType: string; ValueData: "{cm:AppName}.Script"; Components: fileassoc; Flags: uninsdeletevalue;
|
Root: HKCR; Subkey: ".js"; ValueType: string; ValueData: "{cm:AppName}.Script"; Components: fileassoc; Flags: uninsdeletevalue;
|
||||||
|
|
@ -80,7 +75,7 @@ Name: "{app}\tmp";
|
||||||
; Type: files; Name: "{app}\defaultService.js"
|
; Type: files; Name: "{app}\defaultService.js"
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
||||||
Name: "{group}\Start {cm:AppName} Launcher"; Filename: "{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"; AfterInstall: SetElevationBit('{group}\Start {cm:AppName} Launcher.lnk');
|
Name: "{group}\Start {cm:AppName} Launcher"; Filename: "{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"; Components: addtools; AfterInstall: SetElevationBit('{group}\Start {cm:AppName} Launcher.lnk');
|
||||||
Name: "{group}\Test {cm:AppName}"; Filename: "{app}\bootstrap.bat"; AfterInstall: SetElevationBit('{group}\Test {cm:AppName}.lnk');
|
Name: "{group}\Test {cm:AppName}"; Filename: "{app}\bootstrap.bat"; AfterInstall: SetElevationBit('{group}\Test {cm:AppName}.lnk');
|
||||||
Name: "{group}\Uninstall {cm:AppName}"; Filename: "{uninstallexe}"; AfterInstall: SetElevationBit('{group}\Uninstall {cm:AppName}.lnk');
|
Name: "{group}\Uninstall {cm:AppName}"; Filename: "{uninstallexe}"; AfterInstall: SetElevationBit('{group}\Uninstall {cm:AppName}.lnk');
|
||||||
|
|
||||||
|
|
@ -88,12 +83,12 @@ Name: "{group}\Uninstall {cm:AppName}"; Filename: "{uninstallexe}"; AfterInstall
|
||||||
; Filename: {app}\bin\gtk2-runtime-2.24.33-2021-01-30-ts-win64.exe;
|
; Filename: {app}\bin\gtk2-runtime-2.24.33-2021-01-30-ts-win64.exe;
|
||||||
; Filename: {app}\bin\nmap-7.92\VC_redist.x86.exe;
|
; Filename: {app}\bin\nmap-7.92\VC_redist.x86.exe;
|
||||||
; Filename: {app}\bin\nmap-7.92\npcap-1.50.exe;
|
; Filename: {app}\bin\nmap-7.92\npcap-1.50.exe;
|
||||||
Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -NoProfile -File ""{app}\afterInstall.ps1"""; WorkingDir: "{app}"; Components: downloadtools; Flags: waituntilterminated
|
Filename: "powershell.exe"; Parameters: "-ExecutionPolicy Bypass -NoProfile -File ""{app}\afterInstall.ps1"""; WorkingDir: "{app}"; Components: addtools; Flags: waituntilterminated
|
||||||
Filename: {app}\installService.bat; Components: winservice; Flags: nowait
|
Filename: {app}\installService.bat; Components: addtools; Flags: nowait
|
||||||
Filename: "{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"; Flags: nowait
|
Filename: "{userappdata}\{cm:AppName}\bin\WelsonJS.Launcher.exe"; Components: addtools; Flags: nowait
|
||||||
|
|
||||||
[UninstallRun]
|
[UninstallRun]
|
||||||
Filename: {app}\uninstallService.bat; Components: winservice;
|
Filename: {app}\uninstallService.bat; Components: addtools; Flags: waituntilterminated
|
||||||
; Filename: {code:GetProgramFiles}\GTK2-Runtime Win64\gtk2_runtime_uninst.exe;
|
; Filename: {code:GetProgramFiles}\GTK2-Runtime Win64\gtk2_runtime_uninst.exe;
|
||||||
; Filename: {code:GetProgramFiles}\Npcap\Uninstall.exe;
|
; Filename: {code:GetProgramFiles}\Npcap\Uninstall.exe;
|
||||||
; Filename: {app}\bin\nmap-7.92\VC_redist.x86.exe;
|
; Filename: {app}\bin\nmap-7.92\VC_redist.x86.exe;
|
||||||
|
|
|
||||||
|
|
@ -15,4 +15,3 @@ sc stop "%SERVICE_NAME%"
|
||||||
"%INSTALL_UTIL_PATH%" /u "%EXE_PATH%"
|
"%INSTALL_UTIL_PATH%" /u "%EXE_PATH%"
|
||||||
|
|
||||||
echo Service "%SERVICE_NAME%" removed.
|
echo Service "%SERVICE_NAME%" removed.
|
||||||
pause
|
|
||||||
Loading…
Reference in New Issue
Block a user