Article ID: 116384
Article Last Modified on 5/6/2003
Windows 3.x and Windows for Workgroups 3.x ------------------------------------------ Filename: WIN.INI Section: [windows] Item: Programs=com exe bat pif Windows NT 3.x ---------------------------------------------------------------------- Filename: REGEDT32.EXE Registry Key: HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\Windows Value: Programs Type: REG_SZ Item: com exe bat pif cmd
Option Explicit
Function ShellDOS_Exit() As Integer
On Local Error Goto ShellDOS_Exit_Err
Dim MyCommand As String
Dim TaskId As Integer
' Create command string to show the contents of current
' directory. Upon completion the window closes.
MyCommand = "COMMAND.COM /C DIR /P"
TaskId = Shell(MyCommand, 1)
ShellDOS_Exit = True
ShellDOS_Exit_End:
Exit Function
ShellDOS_Exit_Err:
MsgBox Error$
Resume ShellDOS_Exit_End
End Function
Function ShellDOS_Stay() As Integer
On Local Error Goto ShellDOS_Stay_Err
Dim MyCommand As String
Dim TaskId As Integer
' Create command string to show the contents of current
' directory. Upon completion the window remain opens
' at the MS-DOS prompt.
MyCommand = "COMMAND.COM /K DIR /P"
TaskId = Shell(MyCommand, 1)
ShellDOS_Stay = True
ShellDOS_Stay_End:
Exit Function
ShellDOS_Stay_Err:
MsgBox Error$
Resume ShellDOS_Stay_End
End Function
Keywords: kbhowto kbprogramming KB116384