OK disregard that last post, I combined simonkue's ExecCmd code, with my "check for floppy" code, compiled it...and I think I'm done! Everything works!
I'm shipping out 1 floppy with the batch instructions and the autorun CD out to our users, and I'm using it to copy company forms to My Docs, and placing a shorcut to them on the desktop. (you can't believe how hard it was walking my users through this manually over the phone!...uhhh, do I left click or right click on D: ???)
Here's the final code: (thanks everyone!)
Private Type PROCESS_INFORMATION ' For ExecCmd
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
' For ExecCmd
Private Declare Function WaitForSingleObject Lib "kernel32" (ByVal _
hHandle As Long, ByVal dwMilliseconds As Long) As Long
' For ExecCmd
Private Declare Function CreateProcessA Lib "kernel32" (ByVal _
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal _
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, _
lpStartupInfo As STARTUPINFO, lpProcessInformation As _
PROCESS_INFORMATION) As Long
' For ExecCmd
Private Declare Function CloseHandle Lib "kernel32" (ByVal _
hObject As Long) As Long
' For ExecCmd
Private Const NORMAL_PRIORITY_CLASS = &H20&
Private Const INFINITE = -1&
Public Sub ExecCmd(cmdline$)
' ExecCmd
'
Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO
' Initialize the STARTUPINFO structure:
start.cb = Len(start)
' Start the shelled application:
xlret = CreateProcessA(0&, cmdline$, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
' Wait for the shelled application to finish:
xlret = WaitForSingleObject(proc.hProcess, INFINITE)
xlret = CloseHandle(proc.hProcess)
'
End Sub
'Just one simple button on a form
Private Sub Command1_Click()
Dim fsO As Object
Dim S As String
Dim DosProg
DosProg = "a:\setup.bat"
Set fsO = CreateObject("Scripting.filesystemObject"

Do While True
On Error Resume Next
' Check for the presence of setup.bat on the floppy
S = Dir$("A:\setup.bat", vbDirectory)
If Err.Number = 52 Then
Err.Clear
If MsgBox("Put a floppy disk in the A: drive or Click Cancel", vbOKCancel) = vbCancel Then GoTo ErrEnd
Else
Exit Do
End If
Loop
If S <> "" Then
ExecCmd "a:\setup.bat"
'Call ShellAndWait(DosProg, vbMaximizedFocus)
msg = MsgBox("File Copy Complete", vbOKOnly, "Complete"
If msg = 1 Then
End
End If
Else
GoTo ErrEnd
End If
ErrEnd:
Set fsO = Nothing
End
End Sub
'and then add this to a new module, make .EXE and be happy!
Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Global Const NORMAL_PRIORITY_CLASS = &H20&
Global Const INFINITE = -1&
Declare Function CloseHandle Lib "kernel32" (hObject As Long) As Boolean