![](/img/trans.png)
[英]What do I need to install to get x64 debug build of C++ hello world .exe running on Windows Server 2012 R2 Standard?
[英]How do I get MSI to return the correct VersionNT value when running on Windows 2012 R2?
當我在Windows 2012 R2計算機(RTM build 9600)上運行MSI時,VersionNT屬性設置為602(而不是603)。 如果602實際上是正確的操作系統版本,那么如何在安裝時以編程方式區分Windows 2012和Windows 2012 R2?
更新:看起來如果我直接在Windows 2012 R2或Windows 8.1上運行我的MSI,VersionNT將正確地設置為603.如果我的MSI由引導程序(win32應用程序)啟動,則將設置VersionNT,錯誤地,到602.因此,直接運行的MSI與win32應用程序啟動之間存在差異。
Windows 10更新:
我發現當我更新我的引導程序的清單以支持Windows 10兼容性時,MSI的InstallUISequence將正確設置VersionNT = 1000,但InstallExecuteSequence將具有VersionNT = 603。
如何使InstallExecuteSequence也設置VersionNT = 1000?
您的引導程序需要顯式支持Win8 / 2012R3。 這將在Burn中很快在WiX 3.8中修復,但您可以在此處記錄任何引導程序: http : //msdn.microsoft.com/en-us/library/aa374191%28v=vs.85%29.aspx 。
具體來說,您需要為Windows 8和Windows 8.1添加GUID:
{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}
{1f676c76-80e1-4239-95bb-83d0f6d0da78}
如果您可以訪問引導程序的源代碼,那么更好的,面向未來的方法是調用RtlGetVersion
如下所示: http : //msdn.microsoft.com/en-us/library/windows/hardware/ff561910( RtlGetVersion
= vs.85).aspx 。 這是我推動外部刻錄的變化(我們在內部使用Visual Studio)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.