anixon 0 Posted September 25, 2007 This code does not perform the restart function where the file does not exist or the path is incorrect. Opt("RunErrorsFatal", 1) ShellExecute($File, "", $Path & "\", "open") If @error = 1 Then restart() EndIf How do I trap the error as the documentation does not lead me to a solution Cheers Ant.. Share this post Link to post Share on other sites
anixon 0 Posted September 25, 2007 I was able to solve my problem with the following code CODEIf Not FileExists($lgeFileName) Then $message = " Missing File: " & $geMapFile ErrorDisplayMessage() Else $gePImage = $geMapFile ShellExecute($geMapFile, "", $lgePathName & "\", "open") EndIf Cheers Ant.. Share this post Link to post Share on other sites