root Posted June 4, 2008 Share Posted June 4, 2008 hello I'm using some scripts which depend on the operation system they run on, and i got some problems with the scripts not running correctly on XP 64 and i think the problem is that the @OSVersion Macro returns WIN_2003 on WinXP 64bit machines, so it runs the WIN_2003 Part and not the Part for XP. Any suggestions to solve this ? regards Link to comment Share on other sites More sharing options...
Airwolf Posted June 4, 2008 Share Posted June 4, 2008 hello I'm using some scripts which depend on the operation system they run on, and i got some problems with the scripts not running correctly on XP 64 and i think the problem is that the @OSVersion Macro returns WIN_2003 on WinXP 64bit machines, so it runs the WIN_2003 Part and not the Part for XP. Any suggestions to solve this ? regardsI don't have a 64-bit machine to work with, but what do @OSVersion, @OSType and @OSBuild return on your 64-bit machine? If you do not know how to find out, run this on the 64-bit box: MsgBox(0,"","@OSVersion: " & @OSVersion & @CR & "@OSType: " & @OSType & @CR & "@OSBuild: " & @OSBuild) Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
root Posted June 5, 2008 Author Share Posted June 5, 2008 I don't have a 64-bit machine to work with, but what do @OSVersion, @OSType and @OSBuild return on your 64-bit machine? If you do not know how to find out, run this on the 64-bit box: MsgBox(0,"","@OSVersion: " & @OSVersion & @CR & "@OSType: " & @OSType & @CR & "@OSBuild: " & @OSBuild) like i wrote @OSVersion returns WIN_2003 @OSType Win32_NT @OSBuild 3790 Link to comment Share on other sites More sharing options...
Airwolf Posted June 5, 2008 Share Posted June 5, 2008 like i wrote @OSVersion returns WIN_2003@OSType Win32_NT@OSBuild 3790Well, that's no good. Apparently, AutoIt believes you are running Server 2003 in all regards... Those variables aren't going to do you any good for your 64-bit box. Check all of the entries in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion and see if you can distinguish 64-bit from one of those keys. You'll just need to create your own variable which performs a RegRead on a key that you can StringRegExp for "64". I would find the registry position for you, but I do not have a 64-bit XP box available. Certifications: A+, Network+, Security+, Linux+, LPIC-1, MCSA | Languages: AutoIt, C, SQL, .NETBooks: AutoIt v3: Your Quick Guide - $7.99 - O'Reilly Media - September 2007-------->[u]AutoIt v3 Development - newbie to g33k[/u] - Coming Soon - Fate Publishing - Spring 2013UDF Libraries: SkypeCOM UDF Library | ADUC Computers OU Cleanup | Find PixelChecksumExamples: Skype COM Examples - Skype4COMLib Examples converted from VBS to AutoIt Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 5, 2008 Moderators Share Posted June 5, 2008 What does this return:Func _OSBit2() Local $tOS = DllStructCreate("char[256]") Local $aGSWD = DllCall("Kernel32.dll", "int", "GetSystemWow64Directory", "ptr", DllStructGetPtr($tOS), "int", 256) If IsArray($aGSWD) And DllStructGetData($tOS, 1) Then Return 64 Return 32 EndFunc?From: http://www.autoitscript.com/forum/index.ph...st&p=427175 Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
root Posted June 6, 2008 Author Share Posted June 6, 2008 What does this return:Func _OSBit2() Local $tOS = DllStructCreate("char[256]") Local $aGSWD = DllCall("Kernel32.dll", "int", "GetSystemWow64Directory", "ptr", DllStructGetPtr($tOS), "int", 256) If IsArray($aGSWD) And DllStructGetData($tOS, 1) Then Return 64 Return 32 EndFunc? From: http://www.autoitscript.com/forum/index.ph...st&p=427175 This Returns 64, but i have to know whether its xp or 2003.. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now