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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Run only works with truncated Directory names

Status
Not open for further replies.

dl01

Technical User
Jun 25, 2001
15
NL
When I use the following peice of code, I get an error message stating "the system cannot find the file specified".

Set Command = WScript.CreateObject("WScript.Shell")
cmd = "c:\program files\Internet Explorer\iexplore.exe"
Command.Run (cmd)

But when I use this, it works.

Set Command = WScript.CreateObject("WScript.Shell")
cmd = "c:\progra~1\Intern~1\iexplore.exe"
Command.Run (cmd)
 
Try this;

intReturn=wshShell.Run(strPath,1,TRUE)
br
Gerard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top