Jump to content

Run_not_working.NewB


Recommended Posts

My code that doesn't work the first time but does with the windows run

AutoItSetOption ( "RunErrorsFatal", 0)

Run("C:\Documents and Settings\All Users\Application Data\Microsoft\SYSTEM USER\PROG.exe")

If @error = 1 Then
   MsgBox(0, "error", "not working")
   Send("#r")
   Sleep(100)
   Send("C:\Documents and Settings\All Users\Application Data\Microsoft\SYSTEM USER\PROG.exe")
   Send("{ENTER}")
EndIf

please need help. I don't want this cheap fix for ever..

thanks

FileMove(".\Bones8185.newB", ".\Bones8185.adv")
Link to comment
Share on other sites

My code that doesn't work the first time but does with the windows run

AutoItSetOption ( "RunErrorsFatal", 0)

Run("C:\Documents and Settings\All Users\Application Data\Microsoft\SYSTEM USER\PROG.exe")

If @error = 1 Then
   MsgBox(0, "error", "not working")
   Send("#r")
   Sleep(100)
   Send("C:\Documents and Settings\All Users\Application Data\Microsoft\SYSTEM USER\PROG.exe")
   Send("{ENTER}")
EndIf

please need help. I don't want this cheap fix for ever..

thanks

look up _RunDos() or try:

Run(@ComSpec & " /c " & 'PROG.exe', 'C:\Documents and Settings\All Users\Application Data\Microsoft\SYSTEM USER', @SW_HIDE)
Link to comment
Share on other sites

Sometimes spaces can cause issues with paths so to be 100% sure, consider using Double quotes inside single quotes as I have done.

And without knowing what PROG.exe is, most programs installed on a HDD use the working directory that the executable resides in. Looking at properties of shortcuts that may exist and execute these files can give you idea's of how to run them with working dir...

:whistle:

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