I already posted a similar question (NSIS - check if registry key value exists) and the solution to that question worked perfectly:
ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Ports" "NUL:"
And then:
${If} ${Errors}
#and so on
I do the same thing three more times in the script, reading different registry values and all attempts but the last one are successful:
ReadRegStr $3 HKLM "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\SomePrinter" "Name"
This always returns an error.
What should I do differently?
The first time I read a registry value, I use $0
to store the return vale. Then the second time $1
and then $2
and $3
.
As I said, all work except for the last one. Does it have to do with the type of registry key I'm reading or should I use a different variable for the return value? I have tried other variables, but so far nothing has worked.
Thanks for help and tips!