Jump to content

Path used by run() commands


nitro322
 Share

Recommended Posts

Is it possible to make AutoIT use application paths registered directly with Windows in addition to the system %PATH% variable?

In case that doesn't make sense (because I couldn't think of a really clear way to explain it), here's an example. When WinRAR is installed, the an entry for WinRAR.exe gets added to the registry key HKEY_CLASSES_ROOT\Applications\, telling Windows that winrar.exe exists and how to find it. If I click Start, Run..., then type winrar.exe and hit Enter, WinRAR starts for me. However, the %programfiles%\WinRAR is NOT added to the system path, so entering winrar.exe into a CMD shell generates a "file not found" error.

AutoIT seems to only respect the system path by default. If I have the line run("winrar.exe") in my program, it will fail with its own file not found error. I would expect this of something like run(@comspec & " \c winrar.exe"), since that's actually running a command through the CMD shell, but my figure running a command directly should use the same search order Windows itself does.

So, is this possible? Maybe though an option that I haven't seen? If not, is this something that could be added to a future version?

Thanks.

Edited by nitro322
Link to comment
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
 Share

  • Recently Browsing   0 members

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