Dobry den pouzivam inno 5.2.2 setup pro vytvoreni instalatoru. Nicmene mam mensi problem : Potrebuji asociovat moji vlastni koncovku ale nejak se mi to nedari i kdyz mam script v poradku:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
AppName=File Downloader
AppVerName=File Downloader 0.1.0 beta
AppPublisher=michalss (xbox360warez.net)
AppPublisherURL=http://xbox360warez.net/
AppSupportURL=http://xbox360warez.net/
AppUpdatesURL=http://xbox360warez.net/
DefaultDirName={pf}\File Downloader
DefaultGroupName=File Downloader
OutputDir=C:\-- MY PROJECT's --\Installer File Downloader
OutputBaseFilename=File_Downloader.exe
Compression=lzma
SolidCompression=true
PrivilegesRequired=none
AppVersion=0.1.0
AppID={{1DBAFDE3-E11F-4061-9A40-9FC5D5244115}
[Registry]
Root: HKCR; Subkey: .xbl; ValueType: string; ValueName: ; ValueData: FileDownloader; Flags: uninsdeletevalue
Root: HKCR; Subkey: FileDownloaderFile; ValueType: string; ValueName: ; ValueData: FileDownloader File; Flags: uninsdeletekey
Root: HKCR; Subkey: FileDownloaderFile\DefaultIcon; ValueType: string; ValueData: {app}\FileDownloader.exe,2
Root: HKCR; Subkey: FileDownloaderFile\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\FileDownloader.exe"
[Languages]
Name: english; MessagesFile: compiler:Default.isl
Name: czech; MessagesFile: compiler:Languages\Czech.isl
Name: german; MessagesFile: compiler:Languages\German.isl
Name: slovak; MessagesFile: compiler:Languages\Slovak.isl
[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
[Files]
Source: C:\-- MY PROJECT's --\File Downloader\FileDownloader.exe; DestDir: {app}; Flags: ignoreversion
Source: C:\-- MY PROJECT's --\File Downloader\*; DestDir: {app}; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: {group}\File Downloader; Filename: {app}\FileDownloader.exe
Name: {group}\{cm:UninstallProgram,File Downloader}; Filename: {uninstallexe}
Name: {commondesktop}\File Downloader; Filename: {app}\FileDownloader.exe; Tasks: desktopicon
[Code]
procedure CurStepChanged(CurStep: TSetupStep);
var
ResultCode: Integer;
Uninstall: String;
begin
if (CurStep = ssInstall) then begin
if RegQueryStringValue(HKLM, 'Software\Microsoft\Windows\CurrentVersion\Uninstall\MyProgram_is1', 'UninstallString', Uninstall) then begin
MsgBox('Warning: Old Version will be removed!', mbInformation, MB_OK);
Exec(RemoveQuotes(Uninstall), ' /SILENT', '', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
end;
end;
end;
[Run]
Filename: {app}\FileDownloader.exe; Description: {cm:LaunchProgram,File Downloader}; Flags: nowait postinstall skipifsilent
Nevite nekdo prosim kde je chyba. Neco je asi spatne :
[Registry]
Root: HKCR; Subkey: .xbl; ValueType: string; ValueName: ; ValueData: FileDownloader; Flags: uninsdeletevalue
Root: HKCR; Subkey: FileDownloaderFile; ValueType: string; ValueName: ; ValueData: FileDownloader File; Flags: uninsdeletekey
Root: HKCR; Subkey: FileDownloaderFile\DefaultIcon; ValueType: string; ValueData: {app}\FileDownloader.exe,2
Root: HKCR; Subkey: FileDownloaderFile\shell\open\command; ValueType: string; ValueName: ; ValueData: """{app}\FileDownloader.exe"
A pokud pouziji primo v codu aplikaci v udalosti Form1_Load tak to funguje : My.Computer.Registry.ClassesRoot.CreateSubKey(".xbl").SetValue("", Microsoft.Win32.RegistryValueKind.String)
My.Computer.Registry.ClassesRoot.CreateSubKey("FileDownloader\shell\open\command").SetValue("", Application.ExecutablePath & _
" ""%l"" ", Microsoft.Win32.RegistryValueKind.String)
Dekuji
|