Quote Originally Posted by Darkbob
You might want to stay away from the Shell command. It doesn't work properly under Vista. You should use a system call to the ShellExecute function. It passes things along to Windows and lets the system handle it properly. Define Shell Execute like this:

Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpoperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nshowcmd As Long) As Long

If you have an EXE file you want to open you can do it this way:

OpenThisProg$ = "myprog.exe"
rc = ShellExecute(0&, vbNullString, OpenThisProg$, vbNullString, vbNullString, vbMaximizedFocus)
--DB
Yes, my program should work under most modern versions of Windows (maybe NT through Vista?).

With your above example, how would I put the Error or Return Code (I guess that's what I need returned) of running the .EXE into a variable I can refer to later? Will this ShellExecute thing only return to the program once its done executing?

I need actual code in this case; i'm lost. .EXE name is hornetrez.exe, and I need to check to see if the code returned from this .EXE is 1 after execution is complete, if so, then the serial number is valid, otherwise display a message box error.