Here is one way.

VB Code:
  1. On Error Resume Next
  2. Shell "C:\xxx.exe"
  3. If Err.Number = 53 Then
  4.     Err.Clear
  5.     Shell "D:\xxx.exe"
  6. End If