IAmTheManYo Posted April 12, 2011 Share Posted April 12, 2011 I currently have a conflict and need assistance on a workaround. It seems that the included Excel.au3 UDF has issues with 64bit Windows 7 OS' and Outlook 2010. The workaround I found for this is to compile my script as 32bit, which does indeed make the Excel UDF work perfectly. This is where the problem starts, as it seems the Run() function included with Autoit breaks on 64bit Windows 7 OS' if the script isn't compiled as 64bit. This leaves me in a bind, as I need my script to run as a 32bit script to get the UDF to work, however, I need it to run as a 64bit to get the Run() function to work. Any assistance on a workaround or fix would be appreciated. Link to comment Share on other sites More sharing options...
IAmTheManYo Posted April 13, 2011 Author Share Posted April 13, 2011 Anyone have any idea's or suggestions? Link to comment Share on other sites More sharing options...
IAmTheManYo Posted April 16, 2011 Author Share Posted April 16, 2011 Bump. Still wondering if anyone has any suggestions for this. I've came up with a few of my own, but I want to know if there's anything more efficient. Don't be shy. Link to comment Share on other sites More sharing options...
Carlo84 Posted April 16, 2011 Share Posted April 16, 2011 (edited) Bump. Still wondering if anyone has any suggestions for this. I've came up with a few of my own, but I want to know if there's anything more efficient. Don't be shy. the Run function works fine in either mode, try quoting the path if you use command line parameters. [Edit] or by any chance are you trying to run something in @ProgramFilesDir or @ProgramsCommonDir ? Edited April 16, 2011 by Djarlo _SplashProgressImage | _Regionselector | _IsPressed360 | _UserAccountContol_SetLevel | _ListSubFolders Link to comment Share on other sites More sharing options...
Developers Jos Posted April 16, 2011 Developers Share Posted April 16, 2011 Remember that some directories have a different path in X86 and x64 mode. Show the run() statement that fails in x86 mode. 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...
IAmTheManYo Posted April 17, 2011 Author Share Posted April 17, 2011 (edited) #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $s_IP = "0.0.0.0" ;This is usually an actual IP address. $h_Cmd = Run("nbtstat.exe -a " & $s_IP, "", @SW_HIDE, 2) MsgBox(0x40, "", @error) This is the example using AutoIt3Wrapper_UseX64 to troubleshoot. =n(x86) gives me an @error of 1, and =y(x64) works fine. Edit- Using the below code gives the same results - works under x64 but not x86. Does it have something to do with nbtstat perhaps? or am I just missing something? $h_Cmd = Run("C:\Windows\System32\nbtstat.exe -a " & $s_IP, "", @SW_HIDE, 2) Edited April 17, 2011 by IAmTheManYo Link to comment Share on other sites More sharing options...
IAmTheManYo Posted April 17, 2011 Author Share Posted April 17, 2011 Thanks Jos and Djarlo. With the path and directory suggestions I was able to use those as a start for google, and found a really good article that explained redirection and an iffy little issue with nbtstat. The article explained how to use "\Windows\sysnative\" to bypass redirection and now everything seems to be working perfectly. Here's the article for anyone else who stumbles into this problem. http://scottiestech.info/2009/06/20/calling-a-32-bit-system-command-from-a-script-in-x64-windows/ WORKING CODE: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=n #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** $s_IP = "0.0.0.0" $h_Cmd = Run("C:\Windows\sysnative\nbtstat.exe -a " & $s_IP, "", @SW_HIDE, 2) MsgBox(0x40, "", @error) Note: "\Windows\sysnative\" is (I do believe) a x64 directory only. Which means if you're writing a script that goes across multiple architectures, I suggest adding a @OSArch check to see if you should run the command normally, or not. Link to comment Share on other sites More sharing options...
Amen Posted February 28, 2012 Share Posted February 28, 2012 Thanx i was having the same problem with a script using nbtstat on win 7 64 and now is solved. Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- 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