LoRd_MuldeR
14th October 2006, 18:13
That's my NSIS script to set File Asscociations:
Section
DeleteRegKey HKCR ".foo"
WriteRegStr HKCR ".foo" "" "FooFile"
WriteRegStr HKCR "FooFile" "" "Foo File Type"
WriteRegStr HKCR "FooFile\DefaultIcon" "" "foo.exe,0"
WriteRegStr HKCR "FooFile\shell" "" "open"
WriteRegStr HKCR "FooFile\shell\open\command" "" 'foo.exe "%1"'
System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
SectionEnd
Seems to work so far.
BUT: Sometimes it's neccesarry to open Explorer, goto Extras > Options > File Types, seach the new file type in the list and click the "Restore" button. If you don't do that, it'll open the files with the old app. Why is that and is there a way to fix it in my NSIS script ???
Section
DeleteRegKey HKCR ".foo"
WriteRegStr HKCR ".foo" "" "FooFile"
WriteRegStr HKCR "FooFile" "" "Foo File Type"
WriteRegStr HKCR "FooFile\DefaultIcon" "" "foo.exe,0"
WriteRegStr HKCR "FooFile\shell" "" "open"
WriteRegStr HKCR "FooFile\shell\open\command" "" 'foo.exe "%1"'
System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)'
SectionEnd
Seems to work so far.
BUT: Sometimes it's neccesarry to open Explorer, goto Extras > Options > File Types, seach the new file type in the list and click the "Restore" button. If you don't do that, it'll open the files with the old app. Why is that and is there a way to fix it in my NSIS script ???