|
|
#1 |
|
Member
Join Date: Jun 2007
Location: Böblingen
Posts: 94
|
overwrite regkeys
hello,
i use "overwrite off" for my "file" commands. can i also use it "writeregstr ..." ? i dont want to overwrite regkeys. is it possible? |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 2,777
|
no, but you can try to read it first, and only write if it sets the error flag (or returns empty string)
IntOp $PostCount $PostCount + 1 |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
|
Yes, that's right. The best way is write your own macro ;-)
|
|
|
|
|
|
#4 |
|
Member
Join Date: Jun 2007
Location: Böblingen
Posts: 94
|
I have a long list (50) of RegKeys like this:
WriteRegStr HKLM "Software\x\x" "abc" "def" ... WriteRegStr HKLM "Software\x\x" "asd" "gfd" I only want to write them if they not exist. Can you please give me the code for this problem?? Thnaks for your help aemik |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
|
Yes, I can. Sorry for that Czech names
I can also provide script which converts .reg file into NSIS commands like ${registry::________} ... ... ... ... |
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
|
The script was too big.
|
|
|
|
|
|
#7 |
|
Member
Join Date: Jun 2007
Location: Böblingen
Posts: 94
|
thank you for help.
How can i include this script and how can i use it for my registry keys? |
|
|
|
|
|
#8 |
|
Senior Member
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
|
Copy / paste?
Try something like ${ZapisReg} "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion" "ProductId" "this is really CRAP!" "REG_SZ" |
|
|
|
|
|
#9 |
|
Member
Join Date: Jun 2007
Location: Böblingen
Posts: 94
|
where is registry.nsh?
|
|
|
|
|
|
#10 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Just use a macro:
code: ${WriteRegDWORD} HKLM `Software\MyApp` `Blah1` 1 ${WriteRegBin} HKLM `Software\MyApp` `Blah2` ABCD ${WriteRegStr} HKLM `Software\MyApp` `Blah3` Hello Edit: shortened. Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#11 |
|
Senior Member
Join Date: Jun 2007
Location: Otrokovice, Czech Republic
Posts: 308
|
Nice. Why should I do it simply if I can do it intricately?
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|