Jump to content

Recommended Posts

Posted (edited)

I'm trying to automate Bluetooth device pairing and failing at the very first line, opening the Bluetooth Devices panel. Other panels open fine.

Run ("control.exe bthprops.cpl") ; nothing
Run ("control.exe timedate.cpl") ; opens Date and Time

Both lines work when run from an ordinary command line, but I can't find any way to get bthprops to open from AutoIt. Running Windows 7 x64. Does the first run command work for anyone else?

Edited by ChiDragon
Posted (edited)

Yeah. Very confusing. Thanks for the feedback.

EDIT: Even worse, I can't workaround it by running a cmd.exe window using AutoIt. If I try to type in the above commands into the launched window, the bthprops one triggers nothing but a quick flash of the spinning "busy" cursor. Again, the other one works.

Both commands work from a cmd.exe launched by Windows' own Run dialog. I don't understand what the difference could possibly be. I even set the working directory to be the same.

EDIT 2: Got it... 32-bit AutoIt launching 32-bit cmd.exe. For whatever reason I have to use the x64 version of AutoIt. All commands work then. Thanks.

Edited by ChiDragon
Posted

Whoops, guess I didn't refresh the page in between my edits. ShellExecute was actually the first command I tried before switching to Run and it likewise didn't work.

As I said in my edit above, it was just a x86 vs x64 issue. Sure would be nice if Windows gave me some sort of error message instead of silently failing.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...