Archive: Own Ext-register bud not exec from program


Own Ext-register bud not exec from program
Hello,

I have this Code. It run, bud if I start
the file.own from a program (outlook) it do not found a entry.

Bud I doubleclick in explorer program started with file.
Whats wrong?

Code:
Section "Shell HKI with WinHKI" ; SecExtention
SectionIn 1 2 3
; back up old value of .nsi
ReadRegStr $1 HKCR ".hki" ""
StrCmp $1 "" Label1
StrCmp $1 "HKICompress" Label1
WriteRegStr HKCR ".hki" "backup_val" $1
Label1:
WriteRegStr HKCR ".hki" "" "HKICompress"
ReadRegStr $0 HKCR "HKICompress" ""
StrCmp $0 "" 0 skipNSIAssoc
WriteRegStr HKCR "HKICompress" "" "WinHKI File"
WriteRegStr HKCR "HKICompress\shell" "" "open"
WriteRegStr HKCR "HKICompress\DefaultIcon" "" $INSTDIR\winhki.exe
skipNSIAssoc:
WriteRegStr HKCR "HKICompress\shell\compile" "" "Open WinHKI"
WriteRegStr HKCR "HKICompress\shell\compile\command" "" '"$INSTDIR\winhki.exe" "%1"'
SectionEnd

Section "Shell ZIP with WinHKI" ; SecExtention
SectionIn 1 2 3
; back up old value of .nsi
ReadRegStr $1 HKCR ".zip" ""
StrCmp $1 "" Label1
StrCmp $1 "HKIZCompress" Label1
WriteRegStr HKCR ".zip" "backup_val" $1
Label1:
WriteRegStr HKCR ".zip" "" "HKIZCompress"
ReadRegStr $0 HKCR "HKIZCompress" ""
StrCmp $0 "" 0 skipNSIAssoc
WriteRegStr HKCR "HKIZCompress" "" "WinHKI Zip-File"
WriteRegStr HKCR "HKIZCompress\shell" "" "open"
WriteRegStr HKCR "HKIZCompress\DefaultIcon" "" $INSTDIR\winhzip.exe
skipNSIAssoc:
WriteRegStr HKCR "HKIZCompress\shell\compile" "" "Open WinHKI"
WriteRegStr HKCR "HKIZCompress\shell\compile\command" "" '"$INSTDIR\winhzip.exe" "%1"'
SectionEnd

; Uninstall
ReadRegStr $1 HKCR ".hki" ""
StrCmp $1 "HKICompress" 0 NoOwn ; only do this if we own it
ReadRegStr $1 HKCR ".hki" "backup_val"
StrCmp $1 "" 0 RestoreBackup ; if backup == "" then delete the whole key
DeleteRegKey HKCR ".hki"
Goto NoOwn
RestoreBackup:
WriteRegStr HKCR ".hki" "" $1
DeleteRegValue HKCR ".hki" "backup_val"
NoOwn:

ReadRegStr $1 HKCR ".zip" ""
StrCmp $1 "HKIZCompress" 0 NoOwn2 ; only do this if we own it
ReadRegStr $1 HKCR ".zip" "backup_val"
StrCmp $1 "" 0 RestoreBackup2 ; if backup == "" then delete the whole key
DeleteRegKey HKCR ".zip"
Goto NoOwn2
RestoreBackup2:
WriteRegStr HKCR ".zip" "" $1
DeleteRegValue HKCR ".zip" "backup_val"
NoOwn2:
DeleteRegKey HKCR "HKICompress"
DeleteRegKey HKCR "HKIZCompress"


Hello,

Is this Code right or have I forget some?


If it works in explorer it should be ok. Does it work in other file dialogs?


Hello,

In Explorer is all right.
In a Tool. WinRAR can not open it because
it is not entry as program for this
EXT. No Program for this .EXT.

Not in: Outlook, Winrar, .... usw


Please give more details. When do you get errors? Is a standard Windows common dialog?


Hello,

It run all okay, bad only if I start
my Program registry in an Program.
The program tell me that no entry for my
registry .EXT. Bud If I make double click
with Explorer(Windows) My Program open with the file. All right.
I think that are one writeregistry forget
to write in the code.

The small window come with all programs
to connect with my .EXT File. Only in the
most programs.