Jump to content

Recommended Posts

Posted (edited)

Hi all,

This is my first week with AutoIt. I wanted to run an application (ICI.exe) from my script. I have placed ICI.exe in "C:UsersTHIC" folder. I then used

Run("C:UsersTHICICI.exe") in the script . It says "System cannot find the specified file ".

Please advice.

Thanks,

Vivekananda

Edited by Vivek221
Posted

maybe have a look at ShellExecute in the helpfile

This example of mine works fine but not all things like Run sometimes you need ShellExecute

RunWait(@ScriptDir & "file_includesinstallinstall_shockwave.exe /S")
Posted

Thanks vegan, your code helped. Can u explain why is the working directory set to "C:UsersTHIC", isn't it the place where my running script is located? I mean when the correct path is provided, why is the system unable to locate it?

Regards,

,

Vivekananda

Posted (edited)

I think the problem lies in how the program you are running is designed. It may be taking in a parameter such as the location that initiated the program. Therefore, if you are running the AutoIt executable (or shortcut to the exe) from the desktop, it may try to look for other files that it needs in that directory. But I'm only making an educated guess that's what it is.

I have more experience with RunAs causing problems. If you are in a user account and you run a program from the administrator account, it will use the administrator's My Documents, temp folder, etc and not user account's. Sort of a similar thing to your problem.

Edited by sleepydvdr

#include <ByteMe.au3>

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