View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
SATATOM SATATOM is offline
external usenet poster
 
Posts: 7
Default Exe file search and insertion?

Ive read many posts and have not found what im looking for exactly. I need
to search a user's computer looking for a specific file (vncviewer.exe) to be
exact. Then I need to insert that location into a shell command that runs
vncviewer.exe and its associated file; here is my Shell code:

Sub vnctest_macro()
Shell ("C:\Program Files\RealVNC\vncviewer.exe -config C:\temp\v4-xxxx.vnc")
End Sub

The problem is if one doesnt have RealVnc installed in the same place this
wont work and I would like to be able to insert the correct location into my
shell script. If they dont have the .exe at all then I would like an error
msg. If someone has any ideas they would be greatly appreciated.

Thanks, Tom