EDITBased on comment from Peter (thank you for that), I edit my answer.You probably either rights issue - you don't have rights to execute your script on your desktop or you maybe the scripting is blocked altogether? More information is needed from you - what kind of script is that?
The best would be to provide the source code + what are the rights on the directory (or directory chain) where you try to execute your code.This is in case you need to elevate the rights of your script which is not yet your case:You have to have privileges to run your script. You can either start your command prompt as AdministratorOruse runas /noprofile /user:mymachineadministrator yourscript.vbs from your user command lineOrFinally you can add UAC directly to your script:This is source code from Microsoft technet: '-'Elevate this script before invoking it.'
Copy Codecscript host options. script name script options and parametersHost Options enable or disable various Windows Script Host features. Host options are preceded by two slashes (//). Script name is the name of the script file with extension and necessary path information, for example, d:adminvbscriptschart.vbs. Script options and parameters are passed to the script. Script parameters are preceded by a single slash (/).Each parameter is optional; however, you cannot specify script options without specifying a script name. If you do not specify parameters, CScript displays the CScript syntax and the valid host parameters.
Run Vbs File From Cmd Peru Indiana
CScript Example.