sixty4bit
19th October 2001 22:26 UTC
Small problem with WriteRegStr
This is definately an upgrade that needs to happen. Currently, when writing to the registry, the script is only allowed to write DWORD or Strings. There are about 5 different datatypes that are allowed to be written (REG_SZ[default], REG_BINARY, REG_DWORD, REG_MULTI_SZ and REG_EXPAND_SZ) you can get more information on these guys here:
http://msdn.microsoft.com/library/de.../DataTypes.asp
The REG_EXPAND_SZ is needed when writing to the path environment variable or any other environment variable that has a variable in the value (%SYSTEMROOT%). It would be very valuable to be able to specify the data type for writing to the registry.
DWORD, REG_SZ and BINARY are all covered, EXPAND is definately needed.
I really enjoy this product, I will do this in perl for now, but it would be great to have this in the product so that I don't have to maintain the perl script also.
Schultz
20th October 2001 01:12 UTC
in version 1.59 this is posible i belive. just have to add 1 more string to your script..
ReadEnvStr $1 SYSTEMROOT
and then use $1 instead of %SYSTEMROOT% when writing to the registry.
sixty4bit
20th October 2001 03:20 UTC
Clarification
The aim here wasn't to get the value of %SYSTEMROOT%. I need to be able to specify the data type for the registry value. Specifically, need to be able to specify REG_EXPAND_SZ so that when %SYSTEMROOT% is used in a registry string, it will be parsed as whatever the system sees as the root of the system.
Schultz
20th October 2001 05:17 UTC
ok sorry for my ignorance i understand what you are trying to do now.
Edit:
I kinda looked into what you are asking. Not sure if this would go mainstream into NSIS because i can't find out if Win9x supports this or not.. everywhere i have read it only says Windows NT.. But if you want based off NSIS 1.59 i added this feature into it. you can use it via WriteRegExpand
same variables as WriteRegStr. you can get the exe at
http://www.edensrising.com/nsis/makensis.rar the sources are also there if you would perfer to compile it yourself. btw it is rar'ed because webserver treats exe's as cgi executables..
sixty4bit
21st October 2001 16:54 UTC
Awesome! Justin please include
Shultz,
This is awesome! I have a question about the OSVERSIONINFO, do Win2K and WinXP both return WINNT also? I am just concerned about compatability across all Win types. Thanks for this! It is a great help!
Did you submit this as a diff to Justin? I am sure he would include it if you made it easy for him to include.
Thanks again,
Sixty4Bit
Schultz
21st October 2001 23:00 UTC
i had my friend test it under WinXp and he said it returned the WinNT string so it should detect WinXP as WinNT.