schmelle Posted October 8, 2006 Share Posted October 8, 2006 Hi, has anybody an idea how to determine if a 64-Bit OS is running (like Windows XP-Pro-64 or Windows Server "Longhorn")? I'm searching for a Macro like "@ProcessorArch" or a small script. Thanks for your help... Peter [font="Courier New"]Tell it - and I will forget it...Show it - and I will remember me...Share it - and I will understand it![/font] Link to comment Share on other sites More sharing options...
Administrators Jon Posted October 8, 2006 Administrators Share Posted October 8, 2006 Hi,has anybody an idea how to determine if a 64-Bit OS is running (like Windows XP-Pro-64 or Windows Server "Longhorn")?I'm searching for a Macro like "@ProcessorArch" or a small script.Thanks for your help... Peter@ProcessorArch maybe? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
/dev/null Posted October 8, 2006 Share Posted October 8, 2006 @ProcessorArch maybe? was added after this thread.... http://www.autoitscript.com/forum/index.php?showtopic=14565CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf * Link to comment Share on other sites More sharing options...
Administrators Jon Posted October 8, 2006 Administrators Share Posted October 8, 2006 What's wrong with using a combination of OSType and ProcessorArch? OSType = XP and ProcessorArch = X64 Then running WinXP 64 ? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
schmelle Posted October 8, 2006 Author Share Posted October 8, 2006 Hi, A 64-Bit processor can run in 32-Bit Mode. So you are able to run a 32-Bit Windows on a 64-Bit processor. (Intel XEON Processor) When you try to detect the OS with @OSVersion you will receive WIN_XP for example, but @ProcessorArch returns X64. If you try to install Patches for different OS versions you must be able to detect if the OS is 64-Bit or 32-Bit. Did the 64-Bit OS return other Build Version? (I haven't got a 64-Bit System but my script should not run on a 64-Bit system. So I had to check the OS version.) If yes, has anybody the Build numbers? BR Peter [font="Courier New"]Tell it - and I will forget it...Show it - and I will remember me...Share it - and I will understand it![/font] Link to comment Share on other sites More sharing options...
MadBoy Posted October 8, 2006 Share Posted October 8, 2006 (edited) Hi, A 64-Bit processor can run in 32-Bit Mode. So you are able to run a 32-Bit Windows on a 64-Bit processor. (Intel XEON Processor) When you try to detect the OS with @OSVersion you will receive WIN_XP for example, but @ProcessorArch returns X64. If you try to install Patches for different OS versions you must be able to detect if the OS is 64-Bit or 32-Bit. Did the 64-Bit OS return other Build Version? (I haven't got a 64-Bit System but my script should not run on a 64-Bit system. So I had to check the OS version.) If yes, has anybody the Build numbers? BR Peter Well from what i tested ProcesorArch returns 32Bit or 64bit depending on Windows version and not actual state of your processor. I can test it in few minutes but i am sure i tested it some time ago. Edit: Just tested @ProcessorArch on Windows XP 32bit on Athlon64 returns X86. So i guess it's what you need Func DetectInfrastructure() If @OSTYPE = "WIN32_WINDOWS" Then ;If @OSType = "WIN32_NT" Then _AddLineBox("Unsupported Windows version. Use only on 2000/XP/2003 x32/64.") $ErrorIsThere = "Yes" Else If @ProcessorArch = "X86" Then $HKLM = "HKEY_LOCAL_MACHINE" $devcon = $devcon32 If @OSVersion = "WIN_XP" Then _AddLineBox("Detecting Windows version - Windows XP x32") If @OSVersion = "WIN_2000" Then _AddLineBox("Detecting Windows version - Windows 2000 x32") If @OSVersion = "WIN_2003" Then _AddLineBox("Detecting Windows version - Windows 2003 x32") EndIf If @ProcessorArch = "X64" Then $HKLM = "HKEY_LOCAL_MACHINE64" $devcon = $devcon64 If @OSVersion = "WIN_XP" Then _AddLineBox("Detecting Windows version - Windows XP x64") If @OSVersion = "WIN_2000" Then _AddLineBox("Detecting Windows version - Windows 2000 x64") If @OSVersion = "WIN_2003" Then _AddLineBox("Detecting Windows version - Windows 2003 x64") EndIf EndIf EndFunc ;==>DetectInfrastructure Replace _AddlineBox with your code Edited October 8, 2006 by MadBoy Synapsee 1 My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
schmelle Posted October 8, 2006 Author Share Posted October 8, 2006 Wonderful, I'm waiting! Thanks Peter [font="Courier New"]Tell it - and I will forget it...Show it - and I will remember me...Share it - and I will understand it![/font] Link to comment Share on other sites More sharing options...
MadBoy Posted October 8, 2006 Share Posted October 8, 2006 Updated my last post. My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
schmelle Posted October 8, 2006 Author Share Posted October 8, 2006 Fantastic, thanks a million! Peter [font="Courier New"]Tell it - and I will forget it...Show it - and I will remember me...Share it - and I will understand it![/font] Link to comment Share on other sites More sharing options...
Administrators Jon Posted October 8, 2006 Administrators Share Posted October 8, 2006 Yeah, I have a 64bit CPU, but because I'm running XP 32bit I still get "X86" for @ProcessorArch. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
schmelle Posted October 8, 2006 Author Share Posted October 8, 2006 Jon, is it possible for you to describe the @ProcessorArch feature in the helpfile a little bit more? Thanks a lot... Peter [font="Courier New"]Tell it - and I will forget it...Show it - and I will remember me...Share it - and I will understand it![/font] Link to comment Share on other sites More sharing options...
NELyon Posted October 8, 2006 Share Posted October 8, 2006 me to, it always returns 86. Link to comment Share on other sites More sharing options...
jtpr Posted April 28, 2010 Share Posted April 28, 2010 me to, it always returns 86.How about just looking for the "program files (x86)" directory?-Jim Link to comment Share on other sites More sharing options...
PPCC Posted September 6, 2013 Share Posted September 6, 2013 In current version of AutoIt (v3.3.8.1), @ProcessorArch becomes @OSArch. Link to comment Share on other sites More sharing options...
guinness Posted September 6, 2013 Share Posted September 6, 2013 Thanks, but this post is old and outdated. Please refrain from digging up old posts in the future. abberration and PPCC 2 UDF List: _AdapterConnections() • _AlwaysRun() • _AppMon() • _AppMonEx() • _ArrayFilter/_ArrayReduce • _BinaryBin() • _CheckMsgBox() • _CmdLineRaw() • _ContextMenu() • _ConvertLHWebColor()/_ConvertSHWebColor() • _DesktopDimensions() • _DisplayPassword() • _DotNet_Load()/_DotNet_Unload() • _Fibonacci() • _FileCompare() • _FileCompareContents() • _FileNameByHandle() • _FilePrefix/SRE() • _FindInFile() • _GetBackgroundColor()/_SetBackgroundColor() • _GetConrolID() • _GetCtrlClass() • _GetDirectoryFormat() • _GetDriveMediaType() • _GetFilename()/_GetFilenameExt() • _GetHardwareID() • _GetIP() • _GetIP_Country() • _GetOSLanguage() • _GetSavedSource() • _GetStringSize() • _GetSystemPaths() • _GetURLImage() • _GIFImage() • _GoogleWeather() • _GUICtrlCreateGroup() • _GUICtrlListBox_CreateArray() • _GUICtrlListView_CreateArray() • _GUICtrlListView_SaveCSV() • _GUICtrlListView_SaveHTML() • _GUICtrlListView_SaveTxt() • _GUICtrlListView_SaveXML() • _GUICtrlMenu_Recent() • _GUICtrlMenu_SetItemImage() • _GUICtrlTreeView_CreateArray() • _GUIDisable() • _GUIImageList_SetIconFromHandle() • _GUIRegisterMsg() • _GUISetIcon() • _Icon_Clear()/_Icon_Set() • _IdleTime() • _InetGet() • _InetGetGUI() • _InetGetProgress() • _IPDetails() • _IsFileOlder() • _IsGUID() • _IsHex() • _IsPalindrome() • _IsRegKey() • _IsStringRegExp() • _IsSystemDrive() • _IsUPX() • _IsValidType() • _IsWebColor() • _Language() • _Log() • _MicrosoftInternetConnectivity() • _MSDNDataType() • _PathFull/GetRelative/Split() • _PathSplitEx() • _PrintFromArray() • _ProgressSetMarquee() • _ReDim() • _RockPaperScissors()/_RockPaperScissorsLizardSpock() • _ScrollingCredits • _SelfDelete() • _SelfRename() • _SelfUpdate() • _SendTo() • _ShellAll() • _ShellFile() • _ShellFolder() • _SingletonHWID() • _SingletonPID() • _Startup() • _StringCompact() • _StringIsValid() • _StringRegExpMetaCharacters() • _StringReplaceWholeWord() • _StringStripChars() • _Temperature() • _TrialPeriod() • _UKToUSDate()/_USToUKDate() • _WinAPI_Create_CTL_CODE() • _WinAPI_CreateGUID() • _WMIDateStringToDate()/_DateToWMIDateString() • Au3 script parsing • AutoIt Search • AutoIt3 Portable • AutoIt3WrapperToPragma • AutoItWinGetTitle()/AutoItWinSetTitle() • Coding • DirToHTML5 • FileInstallr • FileReadLastChars() • GeoIP database • GUI - Only Close Button • GUI Examples • GUICtrlDeleteImage() • GUICtrlGetBkColor() • GUICtrlGetStyle() • GUIEvents • GUIGetBkColor() • Int_Parse() & Int_TryParse() • IsISBN() • LockFile() • Mapping CtrlIDs • OOP in AutoIt • ParseHeadersToSciTE() • PasswordValid • PasteBin • Posts Per Day • PreExpand • Protect Globals • Queue() • Resource Update • ResourcesEx • SciTE Jump • Settings INI • SHELLHOOK • Shunting-Yard • Signature Creator • Stack() • Stopwatch() • StringAddLF()/StringStripLF() • StringEOLToCRLF() • VSCROLL • WM_COPYDATA • More Examples... Updated: 22/04/2018 Link to comment Share on other sites More sharing options...
JMiles Posted September 12, 2013 Share Posted September 12, 2013 (edited) That's just a selfish rule that was clearly introduced to avoid that you and other long time members have to deal with the same old post. It also contradicts your own actions, because you don't delete this old thread (clearly because it could be useful to others with the same problem), yet at the same time you don't want others to keep it up to date! What kind of stupidty is that, because then what's the whole fucking point of leaving those threads alive, when you're almost cutting people's hands off when they touch it again years later and add useful information. Why the heck are you acting like some dictator when people dig up old conversations, is that the same kind of behavior you show in real life? And what do you think PPCC thinks about your actions, he's using his precious time to help others you fool! Seriously....act normal... if it wasn't for PPCC I wouldn't have known it when I Googled and don't get me started about the thousands of other people finding these old posts and getting confused because you're constantly standing there with your whip, because God forbid if someone digs up an old old post! 13,340 posts...that's your poblem buddy. I see that a lot of with people like you with so many posts, they get really picky, they just want to see the excited stuff that interest THEM. Go and develop some software dude if you want to walk around with "developer" and "developers" under your name and stop acting like a juvenile. Edited September 12, 2013 by JMiles Link to comment Share on other sites More sharing options...
James Posted September 12, 2013 Share Posted September 12, 2013 (edited) That's just a selfish rule that was clearly introduced to avoid that you and other long time members have to deal with the same old post. Go and develop some software dude if you want to walk around with "developer" and "developers" under your name and stop acting like a juvenile. Hold your horses man... The reason old topics shouldn't be revived after a year or more is because it's likely that it contains dated information that could no longer work, or be as efficient. We have your best interests in mind when we place rules on things like this. guinness here deserves every letter you see under his name. Devotion - to AutoIt Evolution - to the Helpfile and the community Veracity - it's just guinness Evangelism - does he ever talk shit about AutoIt? Love - he seriously loves what he does Opinion - I, and many overs cherish his opinion Person - at the end of the day, he's a person, like you and I and deserves the same amount of respect as I'm sure you'd want Egghead - he's fucking brainy as shit. Robot - I swear he never stops working on the helpfile and other parts that he does. The same applies to other developers, past and present. Now leave it be. Edited September 12, 2013 by James FireFox and TheSaint 2 Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
TheSaint Posted September 12, 2013 Share Posted September 12, 2013 Well done James, superb response ... I admire your restraint ... me, I wouldn't have been so nice, first time poster or not. He clearly needs to learn some manners, especially as a first time visitor/member. @JMiles - I suggest, that you spend a bit of time getting familiar with the place, before insulting well-respected members. We have oodles of topics that discuss post necroing ... you could learn a thing or three. Then leave if you don't like our policies. Just think of who you attacked, when next using the Help file ... and hope we are a forgiving lot at the forum. Make sure brain is in gear before opening mouth! Remember, what is not said, can be just as important as what is said. Spoiler What is the Secret Key? Life is like a Donut If I put effort into communication, I expect you to read properly & fully, or just not comment. Ignoring those who try to divert conversation with irrelevancies. If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it. I'm only big and bad, to those who have an over-active imagination. I may have the Artistic Liesense to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage) Link to comment Share on other sites More sharing options...
Developers Jos Posted September 12, 2013 Developers Share Posted September 12, 2013 @jmiles, Not a great way to do an introduction. PM me when you want to talk about it but this is your last outburst in public which was pretty much uncalled for. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Recommended Posts