' This fragment launches Notepad with the current executed script.
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("%windir%\notepad" & WScript.ScriptFullName)
'The following VBScript code does the same thing, except it
' specifies the window type, waits for Notepad to be shut down by the user,
' and saves the error code returned from Notepad when it is shut down.
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, true)
Hi there, this might help.
' The following code opens a cmd window,
' changes to the path to C:\ , and executes the DIR command.
Dim oShell
Set oShell = WScript.CreateObject ("WScript.shell")
oShell.run "cmd /K CD C:\ & Dir"
Set oShell = Nothing
Wolfgang
Beirut/Lebanon