Biarchiv
13th November 2003 11:54 UTC
Write REG-File in Registry
I want write this in the registry.
A simple code.
Can I have a simple code to clear it if uninstall from registriy?
REGEDIT4
[HKEY_CLASSES_ROOT\*\shell\MitNpOeffnen]
@="Mit &Notepad öffnen"
[HKEY_CLASSES_ROOT\*\shell\MitNpOeffnen\command]
@="notepad.exe \"%1\""
Thank you...
Joost Verburg
13th November 2003 11:59 UTC
Use NSIS commands like WriteRegStr and DeleteRegValue to modify registry information. See the users manual for details.
Vytautas
13th November 2003 12:17 UTC
For info about associating file types and unassociating in uninstall check out my NSIS Archive page.
Vytautas :D
Biarchiv
13th November 2003 12:50 UTC
Hello,
This???
WriteRegStr"[HKEY_CLASSES_ROOT\*\shell\MitNpOeffnen]@="Mit &Notepad öffnen""
kichik
13th November 2003 12:52 UTC
No, that's not proper usage. See the manual for usage explanation and the examples (Examples folder, Archive and this forum) for usage examples.
deguix
14th November 2003 00:59 UTC
If you don't want to look in the documentation...:
WriteRegStr
"file.ini""Section""ValueName""Value"
Very easy (for me)...
Vytautas
14th November 2003 01:59 UTC
Originally posted by deguix
If you don't want to look in the documentation...:
WriteRegStr
"file.ini""Section""ValueName""Value"
Very easy (for me)...
One problem with your excample is that the registry does NOT have 'file.ini' it should be HKEY-... entry depending on the registry branch you want to use.
Vytautas
Biarchiv
17th November 2003 13:20 UTC
I read Doku bud I have experimtened with this and EXE-entry.
Then I change it and Windows can not open exe files in future.
I must format and reinstall it.
[HKEY_CLASSES_ROOT\*\shell\MitNpOeffnen]
@="Mit &Notepad öffnen"
[HKEY_CLASSES_ROOT\*\shell\MitNpOeffnen\command]
@="notepad.exe \"%1\""
WriteRegStr_"HKEY_CLASSES_ROOT"_"\*\shell\MitNpOeffnen"_"Mit &Notepad öffnen"_""
WriteRegStr_"HKEY_CLASSES_ROOT"_"\*\shell\MitNpOeffnen\command"_"Mit &Notepad öffnen"_"$INSTDIR\Programm.exe"
;clear
DeleteRegValue "HKEY_CLASSES_ROOT"_"\*\shell\MitNpOeffnen"_"Mit &Notepad öffnen"_""
kichik
17th November 2003 13:52 UTC
It should be:
WriteRegStr HKCR "*\shell\MitNpOeffnen" "" "Mit &Notepate öffnen"
WriteRegStr HKCR "*\shell\MitNpOeffnen\command" "" '"$INSTDIR\Programm.exe"'
#...
DeleteRegKey HKCR "*\shell\MitNpOeffnen"