Davion
13th April 2004 14:17 UTC
WriteRegStr Failure
Ok, the first I wanna say is:
NSIS is great!
I tried Install Shield and any other Programs before, but nothing satisfied me like NSIS
the 2nd thing: My English is bad, don't worry about it
ok, now the most important thing of this post
There is an Error in the Command WriteRegStr...
I Wrote a Program which needs a Password depending on the Database, so I used a var to write the Password in the registry. So far so good - executing the Setup it writes the
key_name in the subkey, but no value - if I change the key_name it writes the value
:igor: I don't know what NSIS doesn't like on PWD as key_name, because it accepts PWX or PWA or anything like this... hope anyone can help me to get this f*cking PWD in the Registry
thanks in advance
Davion
Joel
13th April 2004 15:32 UTC
Can you post the code? Maybe you are missing something. :)
Oh, BTW:
Willkommen zu den Foren.
That means, welcome to the forums. :D
Davion
14th April 2004 06:52 UTC
Willkommen zu den Foren
^^Thanks :D I didn't expect that ;)
ok, it looks like this:
.
. (other stuff)
.
var PWD
.
. (other vars, sections and stuff like that)
.
StrCpy "$PWD" "JW463;"
WriteRegStr HKLM "Software\MyProg" "PWD" "$PWD"
.
. (other stuff)
.
first I thought it happened because of the ';' but without this it didn't work, too.
then I tried other values for $PWD but there was no result
then I just changed "PWD" to "PWE" and it worked fine...
sombody could think it would be easier to change "PWD" but there are a few Customers I would have to update, because all of them have a PWD Field in the registry
if there are still open questions, you can also write a mail or a PM
come on don't be shy ;)
Hope this wasn't too bad english
Davion
14th April 2004 13:24 UTC
worried
Ok, I tried it with another script again
and it worked... :igor:
I copied the few lines into my other script and it still didn't...
I don't know whats going on there
I had an error like this with another script, I tried and tried but it didn't work after a reinstallation of NSIS it worked
am I stupid or are there known errors like this?
*throwing the PC through the window*
much better
now in serious, which I make wrongly?
EDIT:
I have the Error:
WriteRegStr HKLM "Software\My Prog" "PWD" "$c_PWD"
^^doesn't work
WriteRegStr HKLM Software\MyProg "PWD" "$c_PWD"
^^works fine
But there is the problem that I have to use THIS sub_key...
It seems to be a "bug" in NSIS - hope anyone has an Idea how to fix it
Bennyyy
15th April 2004 14:02 UTC
hi
try this:
WriteRegStr HKLM "Software\MyProg\PWD" "$c_PWD"
Joost Verburg
15th April 2004 14:09 UTC
That is not going to work. If you think it's a NSIS bug, please create a script that reproduces the problem and submit a bug report at the project page.
Davion
15th April 2004 14:38 UTC
Yeah
THX this works!:D
WriteRegStr HKLM "Software\MyProg" "PWD" "$c_PWD"
^^old
WriteRegStr HKLM "Software\MyProg\" "PWD" "$c_PWD"
^^new
just a missing backslash :igor: