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

A problem in <oShell.Run>

Status
Not open for further replies.

Bitaoo

Programmer
Dec 18, 2002
81
US
Hello friends,

The following is my code. oShell.Run returns an error
<Method 'Run' of object 'IWshShell3' failed', I think
it is because there is a blank in &quot;My Directory&quot; ,
do you know how can I solve it?

sub main()
Dim oShell As Object
Dim nRet As Long

Set oShell = CreateObject(&quot;WSCript.shell&quot;)
nRet = oShell.Run(&quot;C:\My Directory\RMS.exe&quot;, , False)
Set oShell = Nothing
end sub

Thanks,
--Bita
 
You might try using the short name for My Documents - mydocu~1
nRet = oShell.Run(&quot;C:\mydocu~1\RMS.exe&quot;, , False) Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top