JustScriptIt
Technical User
I am following the tutorial on this page
When I run the following from a command prompt
I get the following error:
open_notepad.vbs(8, 1) (null): The system cannot find the file specified.
Why is this happening?
When I run the following from a command prompt
Code:
Option Explicit
Dim WshShell, objShell
' Launch Notepad with the current executed script:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run ("%windir%\notepad" & WScript.ScriptFullName)
' Launch Notepad with the current executed script, specify the
' window type, wait for Notepad to be shut down by the user,
' and save the error code returned from Notepad when it exits:
Set WshShell = WScript.CreateObject("WScript.Shell")
Return = WshShell.Run("notepad " & WScript.ScriptFullName, 1, true)
'Open a cmd window, change the path to C:\ , and execute the DIR command:
Set objShell = WScript.CreateObject ("WScript.shell")
objShell.run "cmd /K CD C:\ & Dir"
Set objShell = Nothing
I get the following error:
open_notepad.vbs(8, 1) (null): The system cannot find the file specified.
Why is this happening?