SpidieMan
25th September 2009 18:34 UTC
/3GB switch in Windows (XP, Vista, 7)
Hi,
How do I toggle the /3gb switch (in Windows' boot.ini) using NSIS Scripting?
And how do I make the installer detect Windows version (i.e. XP/Vista/7 and x86/x64) and say, "Your version of Windows is not supported" and so on? Is there a one line command for that?
Thanks
MSG
25th September 2009 18:39 UTC
For the first, I suppose you can simply edit boot.ini?
http://nsis.sourceforge.net/Docs/Chapter4.html#4.9.2
For the windows version detection, use winver.nsh.
kichik
25th September 2009 19:31 UTC
Executing bootcfg.exe makes editing boot.ini easier. I wouldn't use NSIS internal INI functions as it's not really an INI file.
SpidieMan
25th September 2009 19:47 UTC
That is what I have been doing so far. I have been using bootcfg and bcedit to add the /3gb switch. But with bootcfg, I can't tell if it is adding the /3gb switch to the active OS.
I just tell it to add it to the first OS entry in the boot ini and hope that the user just has one copy of OS installed.