landgrimtham
29th October 2004 03:33 UTC
Question on ReadRegStr & WriteRegStr
hi guys,
its me again.
i have a question on write and read regstr. Is it possible to use the WriteRegStr command to write something into the registry and immediately use the readredstr command to read it out and use a Strcmp command to do something?
any comments?
thanks guys
landgrimtham
29th October 2004 03:37 UTC
maybe i should give an example on what i'm refering to..
i'm thinking i can write a uninstall flag into my registry to set as 1
WriteRegStr HKLM "${MicrosoftAddRemove}\${CHECK4INSTALLER_4}" "Uninstall_Flag" "1"
then when i want to uninstall i will check for this flag using the readregstr command
ReadRegStr $5 HKLM "${MicrosoftAddRemove}\${CHECK4INSTALLER_4}" "Uninstall_Flag"
then i use strcmp to check if there is really a flag if not then jump to somewhere else.
Strcmp $5 $R7 End_of_uninstaller_4 Call_mass_uninstall_4
but my code seem not to work. cant fig out why..
Joel
29th October 2004 03:49 UTC
Is it possible to use the WriteRegStr command to write something into the registry and immediately use the readredstr command to read it out and use a Strcmp command to do something?
Yes, speed is everything, right? :D
landgrimtham
29th October 2004 03:51 UTC
thank lobo,
but why cant it work then.
Joel
29th October 2004 04:01 UTC
1.- Check your defines: ${MicrosoftAddRemove}
${CHECK4INSTALLER_4}
2.- Maybe your $5 is returning "string" when you expect string. Registry stuff <_<
landgrimtham
29th October 2004 04:05 UTC
hi lobo,
i'm sure my (1.) is correct. i have used it for other part in my code.
but for the (2.) i'm not 2 sure..
would you be so kind as to advice me on how do i go about checking is it a returning "string"??
Joel
29th October 2004 04:09 UTC
Try making a simple code for see what's returning your $5.
Before doing the parsing
landgrimtham
29th October 2004 04:28 UTC
yah i was actually trying it out while replying to you.
I'm debugging it using a msgbox. and the msgbox returns me 'blank'
sign..
landgrimtham
29th October 2004 04:50 UTC
hi bros,
so what should be done if the $5 is a return string? Pop $5??
Joel
29th October 2004 15:20 UTC
Nsis handle strings...
even the numbers are trated as strings :confused:
see your PMs :)