Giggo Posted February 8, 2022 Posted February 8, 2022 (edited) Hello Forum! Is possible convert the registry file: expandcollapse popupWindows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\AutoIt3Script] @="AutoIt v3 Script" [HKEY_CLASSES_ROOT\AutoIt3Script\DefaultIcon] @="C:\\Program Files (x86)\\AutoIt3\\Icons\\au3script_v11.ico" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell] @="Run" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Compile] @="Compile Script" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Compile\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\Aut2Exe\\Aut2Exe.exe\" /in \"%l\"" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\CompileX64] @="Compile Script (x64)" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\CompileX64\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\Aut2Exe\\Aut2Exe_x64.exe\" /in \"%l\"" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\CompileX86] @="Compile Script (x86)" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\CompileX86\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\Aut2Exe\\Aut2Exe.exe\" /in \"%l\"" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Edit] @="Edit Script" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Edit\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\SciTE\\SciTE.exe\" \"%1\"" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Open] @="Open" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Open\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\SciTE\\SciTE.exe\" \"%1\"" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Run] @="Run Script" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\Run\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe\" \"%1\" %*" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\RunX64] @="Run Script (x64)" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\RunX64\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\AutoIt3_x64.exe\" \"%1\" %*" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\RunX86] @="Run Script (x86)" [HKEY_CLASSES_ROOT\AutoIt3Script\Shell\RunX86\Command] @="\"C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe\" \"%1\" %*" to NSIS code? the test with inno setup does not perfect working. [Registry] Root: HKCR; SubKey: AutoIt3Script\Shell\Open\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\AutoIt3.exe"" ""%1"" %*"; Flags: uninsdeletevalue uninsdeletekeyifempty Thanks in advance! Resolved by ISS CLOSED! expandcollapse popup;-> Script by Giggo ISS 6.2.0 ;---------------------------- #Define MyAppName "AutoIt3" #Define MyAppExeName "AutoIt3.exe" #Define Version '3.3.14.5' #Define Copy "© AutoIt Team" #Define Setup "autoit-v3-mod-setup" #Define Log #Define NotepadPlus #Define OutputSetup ="AutoitSetup" [Setup] AppName={#MyAppName} AppVerName={#MyAppName} AppVersion={#Version} AppPublisher={#Copy} DefaultDirName={commonpf}\{#MyAppName} WizardImageFile=AUT\autoit-v3-setup\Icons\modern-wizard.bmp WizardSmallImageFile=AUT\autoit-v3-setup\Icons\modern-small.bmp SetupIconFile=AUT\autoit-v3-setup\Icons\auticon.ico UninstallDisplayIcon={app}\{#MyAppExeName} OutputBaseFilename={#Setup} Outputdir={#OutputSetup} VersionInfoDescription={#MyAppName} VersionInfoCompany={#Copy} VersionInfoProductVersion={#Version} VersionInfoProductName={#MyAppName} VersionInfoVersion={#Version} AppCopyright=© by {#copy} ShowTasksTreeLines=yes DirExistsWarning=no MinVersion= 0,6.1sp1 InternalCompressLevel=none ShowLanguageDialog=no Compression=none uninstallable=yes SolidCompression=yes DisableProgramGroupPage=yes ChangesAssociations=yes #ifdef log SetupLogging=yes #endif WizardStyle=classic DisableWelcomePage=no UsePreviousLanguage=no [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" [Tasks] Name: "Folder"; Description: "Create AutoIt3 link"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "Un"; Description: "Create uninstall icon"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "KODA"; Description: "Create KODA icon"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked Name: "EX"; Description: "Include extra file"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked [Files] Source: "AUT\autoit-v3-setup\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Source: "AUT\Extras\*"; DestDir: "{app}\Extras"; Flags: ignoreversion recursesubdirs createallsubdirs; Tasks: EX Source: "AUT\Programs\*"; DestDir: "{app}\Programmi"; Flags: ignoreversion recursesubdirs createallsubdirs; Tasks: EX [Icons] Name: "{autodesktop}\Folder {#MyAppName}"; Filename: "{app}"; Tasks: Folder Name: "{autodesktop}\Uninstall {#MyAppName}"; Filename: "{app}\unins000.exe"; Tasks: Un Name: "{autodesktop}\Start Koda"; Filename: "{app}\SciTE\Koda\FD.exe"; Tasks: KODA [Registry] ;some voices are in Italian you have to convert them into your own language ;) Root: HKCR; SubKey: AutoIt3Script; ValueType: string; ValueData: AutoIt v3 Script; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\DefaultIcon; ValueType: string; ValueData: C:\Program Files (x86)\AutoIt3\Icons\au3script_v11.ico; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell; ValueType: string; ValueData: Run; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Compile; ValueType: string; ValueData: Compile Script; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Compile\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe.exe"" /in ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Compila con Opzioni; Flags: uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Compila con Opzioni\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe"" ""C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"" /ShowGui /in ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\CompileX64; ValueType: string; ValueData: Compila Script (x64); Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\CompileX64\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\Aut2Exe\Aut2Exe_x64.exe"" /in ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Edit; ValueType: string; ValueData: Edita Script; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Edit\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\SciTE\SciTE.exe"" ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Run; ValueType: string; ValueData: Avvia Script; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\Run\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\AutoIt3.exe"" ""%1"" %*"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\RunX64; ValueType: string; ValueData: Avvia Script (x64); Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\RunX64\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\AutoIt3_x64.exe"" ""%1"" %*"; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\RunX86; ValueType: string; ValueData: Avvia Script (x86); Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: AutoIt3Script\Shell\RunX86\Command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\AutoIt3.exe"" ""%1"" %*"; Flags: uninsdeletevalue uninsdeletekeyifempty #ifdef NotepadPlus Root: HKCR; SubKey: *\shell\Apri con Notepad++; ValueType: string; ValueName: Icon; ValueData: C:\Program Files (x86)\AutoIt3\Notepad++\notepad++.exe; Flags: uninsdeletevalue uninsdeletekeyifempty Root: HKCR; SubKey: *\shell\Apri con Notepad++\command; ValueType: string; ValueData: """C:\Program Files (x86)\AutoIt3\Notepad++\notepad++.exe"" ""%1"""; Flags: uninsdeletevalue uninsdeletekeyifempty #endif [Messages] BeveledLabel={#MyAppName} v{#Version} {#Copy} [UninstallDelete] Type: filesandordirs; Name: "{app}" [Code] procedure InitializeWizard(); begin with WizardForm do begin Caption:='{#MyAppName} Setup'; end;end; procedure CurPageChanged(CurPageID: Integer); begin case CurPageID of wpInstalling:begin WizardForm.CancelButton.Visible:=false; end; wpfinished:begin end; end; end; function InitializeSetup(): Boolean; var Uninstall,Location:string; ResultCode: Integer; begin if RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}_is1','UninstallString', Uninstall) then Uninstall:=RemoveQuotes(Uninstall); begin if not Exec(Uninstall, '', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\{#MyAppName}_is1','InstallLocation', Location); Result := True; end; end; #ifdef log procedure CurStepChanged(CurStep: TSetupStep); var logfilepathname, logfilename, newfilepathname: string; begin logfilepathname := ExpandConstant('{log}'); logfilename := ExtractFileName(logfilepathname); newfilepathname := ExpandConstant('{app}\') + logfilename; if CurStep = ssDone then begin FileCopy(logfilepathname, newfilepathname, false); end; end; #endif Edited February 10, 2022 by Giggo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now