Jump to content

Recommended Posts

Posted

Why does this fail unless I include "notepad.exe"?

FAILS:

Run("C:\WINDOWS\system32\Help.txt", @SystemDir)

FAILS:

Run(@SystemDir & "\Help.txt", @SystemDir)

SUCCEEDS:

Run("notepad.exe C:\WINDOWS\system32\Help.txt", @SystemDir)

SUCCEEDS:

Run("notepad.exe" & @SystemDir & "\Help.txt", @SystemDir)

Same thing with CHM files. I wouldn't mind if I knew what to use in place of "notepad.exe" when trying to run a chm file instead of a txt file.

My real concern is running the chm files. The txt files were just for testing.

Any suggestions would be greatly appreciated!

-Steve

Posted (edited)

i think you can attempt to run any file by typing this

Run ( "run " & file-to-run )

edit: i was wrong, its

Run ( @ComSpec & " /c start " & file-to-run )

example:

Run ( @ComSpec & " /c start http://www.autoitscript.com", "", @SW_HIDE )

Edited by Xenogis

[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

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
×
×
  • Create New...