Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Run on path with brackets () 1

Status
Not open for further replies.

bnothos

Programmer
Nov 6, 2003
24
CA
I'm trying to get a .Run to work but my path has brackets in it ie:

"C:\Program Files\foo\foo (FOO)\foo.exe"

It chokes on the brackets. How do I escape them or do something so they will be correctly interpreted as part of the path?

Thanks
 
I don't think the () would cause an issue. If anything, it would be the space. Try:

Code:
objShell.Run Chr(34) & "C:\Program Files\foo\foo (FOO)\foo.exe" & Chr(34)

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Excellent thanks!

Strangely if I moved the executable 1 directory up so I had no brackets in the path it worked so I assumed it was the brackets... This works though!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top