We have an infopath form with a button. When the user clicks the button, code is executed. It simply runs a file located on the "C" drive
objShell.ShellExecute("ListShipDocsToBeImported.cmd");
Often, the user will get a message "Windows cannot find ListShipDocsToBeImported.cmd. Make sure you typed the name correctly and try again."
The users work around is to reboot the computer and then it will work. The form is located in a directory called C:\aoe. The cmd file is also located in the same directory.