cherdeg Posted October 9, 2008 Share Posted October 9, 2008 (edited) Hello Developers,I dunno if I found a bug...I'm just still too new to all this to finally decide about it. Problem:The "Run()" command used in a script compiled to a 32bit executable won't start "shutdown.exe" on a x64 OS. But at other places of the same script I use "Run()" and "RunWait()" to e.g. start "netsh.exe", "net.exe", service pack executables, software installers, "setacl.exe", "regedit.exe", etc.,pp. And all run perfectly smooth started by a 32bit exe used on a 64bit OS. If I compile the script to be a 64bit executable, everything works. The "shutdown.exe" on the target x64 system is the untouched right version of a freshly installed Windows Server 2003 Standard Edition R2 x64.Please help: for me this currently is a show stopper, because I'm forced to have only one and universally usable version of my tool (which has to be audited against out, ooomph, _very_ restrictive security policies). Thank you very much,Regards,Chris Edited October 9, 2008 by cherdeg Link to comment Share on other sites More sharing options...
infernothebest Posted October 9, 2008 Share Posted October 9, 2008 try, ShellExecute Apple Keybord shortcuts for XP Link to comment Share on other sites More sharing options...
cherdeg Posted October 9, 2008 Author Share Posted October 9, 2008 try ShellExecute Does not work at all: ShellExecute("C:\WINDOWS\system32\shutdown.exe", " -r -f -t 30", "C:\WINDOWS\system32", "", @SW_HIDE) ...gives me a msgbox telling "C:\WINDOWS\system32\shutdown.exe" was not found. "Dir" can find it and "attrib" shows, that only "A" is set. Do I do something wrong? Link to comment Share on other sites More sharing options...
BrettF Posted October 9, 2008 Share Posted October 9, 2008 (edited) Try @SystemDir & "\Shutdown.exe" Cheers, Brett Is your file compiled for X64 use? If I recall correctly, many things are different for 32 and 64 bit versions of AutoIt. Maybe wait till a more knowledgable member pops their head in.... Edited October 9, 2008 by BrettF Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
cherdeg Posted October 9, 2008 Author Share Posted October 9, 2008 Try @SystemDir & "\Shutdown.exe"Cheers,BrettIs your file compiled for X64 use? If I recall correctly, many things are different for 32 and 64 bit versions of AutoIt. Maybe wait till a more knowledgable member pops their head in.... Nope. Please see my other post regarding the initial problem. There you can find a solution...never the less thank you for intervening! @Mods: Please Lock/Close/Delete this one...thanks! 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