Powershell 32-bit and 64-bit version
64-bit: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
32-bit: C:\Windows\SysWOW64\WindowsPowerShell\v1.0\powershell.exe
alternative way to determine if your are running 32 version or 64 version:
PS C:\Windows\System32\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 4) { “32-bit” }
PS C:\Windows\System32\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 8) { “64-bit” }
64-bit
PS C:\Windows\System32\WindowsPowerShell\v1.0> [Environment]::Is64BitProcess
True
==============
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 4) { “32-bit” }
32-bit
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> if ([System.IntPtr]::Size -eq 8) { “64-bit” }
PS C:\Windows\SysWOW64\WindowsPowerShell\v1.0> [Environment]::Is64BitProcess
False
==============
http://msdn.microsoft.com/library/system.intptr.aspx
转载请注明: 转载自Legend‘s BLog
未经允许不得转载:Legend‘s BLog » Powershell 32-bit and 64-bit version
发表评论