Input Error when running WSH script -
i'm trying run wsh script using cscript in cmd got error
input error: there no script file specified. using command
cscript c:\file.wsh on windows 7 ultimate wsh script writes registry entry don't want use vbscript (.vbs) or wscript engine how can make wsh script work ?
.wsh
the windows script host control file (.wsh) text document in can customize execution of 1 or more of scripts. created automatically when set properties supported script file.
the following example illustrates typical .wsh file:
[scriptfile] path=c:\winnt\samples\wsh\showprop.vbs [options] timeout=0 displaylogo=1 batchmode=0 the path information in [scriptfile] section identifies script file associated .wsh file. keys in [options] section correspond settings in script tab within properties dialog box.
note:
- you must have original script file present when executing
.wshfile. if.wshfile fails run script, checkpath=information in.wshfile ensure points script attempting run. - when double-click
.wshfile or run command line,cscript.exeorwscript.exereads.wshfile determine specific settings should used execute script.cscript/wscriptexecutes original script, passing in properties defined within.wshfile. - it's not possible specify script parameters
.wshfile. must run script (either script file or.wshfile) command prompt add parameters.
Comments
Post a Comment