Sign in to follow this  
Followers 0
cherdeg

Bug in Run() ?

5 posts in this topic

#1 ·  Posted (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 by cherdeg

Share this post


Link to post
Share on other sites



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?

Share this post


Link to post
Share on other sites

#4 ·  Posted (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.... :P

Edited by BrettF

Share this post


Link to post
Share on other sites

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.... :P

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!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0