Check the %PATHEXT%
system environment variable: set PATHEXT
command should return a list of recognized executable file extensions and should contain the .VBS
, for instance as follows:
==>set pathext
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
Check file association using assoc
and ftype
commands as follows:
==>assoc .vbs
.vbs=VBSFile
==>ftype VBSFile
VBSFile="%SystemRoot%\System32\WScript.exe" "%1" %*
To re-establish the link between the .vbs
FileType and an executable program (note that cmd
should be run as administrator and the operating sequence matters):
ftype VBSFile="%SystemRoot%\System32\WScript.exe" "%1" %*
assoc .vbs=VBSFile
or
ftype VBSFile="%SystemRoot%\System32\CScript.exe" "%1" %*
assoc .vbs=VBSFile
If you are using above commands from a batch script then double percent signs in "%%1"
and %%*
as follows:
ftype VBSFile="%SystemRoot%\System32\WScript.exe" "%%1" %%*
assoc .vbs=VBSFile
or
ftype VBSFile="%SystemRoot%\System32\CScript.exe" "%%1" %%*
assoc .vbs=VBSFile
Gage
name comes from? FYI: in my OS anotherOpen with
dialogue appears so I can't reproduce your issue satisfactorily. – JosefZstart %~dp0 req.vbs
between%~dp0
andreq.vbs
. Trystart %~dp0req.vbs
orstart "" "%~dp0req.vbs"
– JosefZ