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
Question on ReadRegStr & WriteRegStr
10 posts
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..
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..
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? 😁
thank lobo,
but why cant it work then.
but why cant it work then.
1.- Check your defines: ${MicrosoftAddRemove}
${CHECK4INSTALLER_4}
2.- Maybe your $5 is returning "string" when you expect string. Registry stuff <_<
${CHECK4INSTALLER_4}
2.- Maybe your $5 is returning "string" when you expect string. Registry stuff <_<
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"??
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"??
Try making a simple code for see what's returning your $5.
Before doing the parsing
Before doing the parsing
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..
I'm debugging it using a msgbox. and the msgbox returns me 'blank'
sign..
hi bros,
so what should be done if the $5 is a return string? Pop $5??
so what should be done if the $5 is a return string? Pop $5??
Nsis handle strings...
even the numbers are trated as strings 😕
see your PMs 🙂
even the numbers are trated as strings 😕
see your PMs 🙂