Archive: /3GB switch in Windows (XP, Vista, 7)


/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


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.


Executing bootcfg.exe makes editing boot.ini easier. I wouldn't use NSIS internal INI functions as it's not really an INI file.


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.