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!

Make shell resistant to programs it can not find

Status
Not open for further replies.

hilliolouis

Programmer
Jul 22, 2005
51
GB
How would you set the app just to either show a message or do nothing if it cannot find an application run though the Shell command?
Thanks

Louis Hill
 
Could it be an idea to try to trap it before Shell barfs, through for instance the [tt]File.Exists Method[/tt] of the System.IO namespace?

[tt]If File.Exists(strPath) Then
' shell your app
else
messagebox.show("your message")
end if
[/tt]

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top