Output of Environment.GetEnvironmentVariable(“PROCESSOR_ARCHITECTURE”) and OperatingSystem.Platform on Windows RT

让人想犯罪 __ 提交于 2019-12-11 10:58:31

问题


I'm writing a cross-platform application and I really need some basic info about the system. Not just for switching it (I could use compile variables, since I have the same code linked in platform-specific projects).

So don't tell me that knowing the platform and architecture info is useless:
Windows RT and c#

Can anybody provide me with this info, because I don't have any easy way to get it by my-self (I have no emulator/device to work with, I'm using a netbook with linux installed on it, so no VT-d capability and so on).

P.S. Please just avoid posting something like: "use qemu, use xxx, yyyy" etc. Consider that somebody might be looking for this info as well.


回答1:


Output of 'set' on a Surface RT

ALLUSERSPROFILE=C:\ProgramData
APPDATA=C:\Users\[user]\AppData\Roaming
CommonProgramFiles=C:\Program Files\Common Files
COMPUTERNAME=SURFACE
ComSpec=C:\windows\system32\cmd.exe
FP_NO_HOST_CHECK=NO
HOMEDRIVE=C:
HOMEPATH=\Users\
LOCALAPPDATA=C:\Users\[user]\AppData\Local
LOGONSERVER=\\MicrosoftAccount
NUMBER_OF_PROCESSORS=4
OS=Windows_NT
Path=C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PROCESSOR_ARCHITECTURE=ARM
PROCESSOR_IDENTIFIER=ARM Family 7 Model C09 Revision 209, NVIDIA
PROCESSOR_LEVEL=3081
PROCESSOR_REVISION=0209
ProgramData=C:\ProgramData
ProgramFiles=C:\Program Files
PROMPT=$P$G
PSModulePath=C:\windows\system32\WindowsPowerShell\v1.0\Modules\
PUBLIC=C:\Users\Public
SESSIONNAME=Console
SystemDrive=C:
SystemRoot=C:\windows
TEMP=C:\Users\[user]\AppData\Local\Temp
TMP=C:\Users\[user]\AppData\Local\Temp
USERDOMAIN=SURFACE
USERDOMAIN_ROAMINGPROFILE=SURFACE
USERNAME=
USERPROFILE=C:\Users\[user]
windir=C:\windows

Ok, and the platform value:

PS C:\Users\[user]> [system.environment]::OSVersion.Platform
Win32NT

Note that this is from the desktop. For immersive/metro applications you will probably need a different api.



来源:https://stackoverflow.com/questions/13807142/output-of-environment-getenvironmentvariableprocessor-architecture-and-opera

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!