Skip to main content

All Questions

Tagged with
0 votes
0 answers
193 views

Getting Invalid root in registry key when running CScript.exe from a windows Cmd file

I am running a test.cmd file from a C# exe by creating a System.Diagnostics.Process. The test.cmd is launching a JScript file using the Windows Scripting Host Command Line as below C:\myfolder>...
user3248103's user avatar
-1 votes
1 answer
84 views

Is there a way to remove extra verbage on screen when using cscript? [duplicate]

I am working on a project in my spare time to make my life easier at work but when I put in a cscript for looking at what the default printer is on my script I get extra verbage that I do not want to ...
Kenneth Berrian's user avatar
1 vote
1 answer
812 views

How to use variables in Wscript.Shell + cmd.exe?

I'm trying to substitute variables to path in a wsh.run command (it should launch a batch file), but I got an error in the dos console: "The file name, directory name or volume label syntax is ...
neutron's user avatar
  • 11
0 votes
1 answer
257 views

Is there another way to run the CMD command without calling Cscript, Wscript or PowerShell?

I had a CMD command to set VLC media player to record video in certain time period that user requested. It was working until McAfee having updated definition from the corporate server to stop ...
new_IT_us's user avatar
0 votes
1 answer
6k views

WScript.CreateObject("WScript.Shell") is not recognized in cmd in win8

I am facing error in win 8.1 64bit when i am running this command: start "" "X:\Windows\System32\devmgmt.msc" Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.SendKeys "{TAP}" pause I ...
KHALIL-VIT's user avatar
2 votes
1 answer
1k views

How to get CMD output in HTA file within JavaScript

I run some CMD commands in my HTA file like <script> var WShell = new ActiveXObject('WScript.Shell'); WShell.run('cmd /c the_first_command'); WShell.run('cmd /c the_second_command'); </...
stckvrw's user avatar
  • 1,761
1 vote
1 answer
2k views

How to run CMD commands one by one in HTA

I'm trying to run in my HTA file the following Win CMD commands one by one <script> var WShell = new ActiveXObject('WScript.Shell'); WShell.run('cmd /c "cd C:\\Users\\Username\\myFolder &&...
stckvrw's user avatar
  • 1,761
2 votes
2 answers
796 views

How to display a message when opening HTA file with VBS

I have VBS file with the only line CreateObject("Wscript.Shell").Run "cmd /c start mshta.exe %cd%/app.hta",0,True When I click this VBS file, there is a delay before the HTA file is opened, so I ...
stckvrw's user avatar
  • 1,761
3 votes
2 answers
4k views

How to hide cmd.exe and cscript command prompts?

I have a test.cmd file on my desktop. In it contains the following line: cmd.exe /c "cscript foo.js" Is it possible to completely silence/quiet/supress/hide any and all console windows from popping ...
Nicole's user avatar
  • 109
0 votes
0 answers
975 views

Can't upload a file to FTP with WScript.Shell / cmd [duplicate]

I've created simple HTA-page <input type="button" value="Run" onclick="run();"> <script> function run() { var shell = new ActiveXObject('WScript.Shell'); shell.run('cmd /c ftp -i -s:D:\...
stckvrw's user avatar
  • 1,761
1 vote
1 answer
1k views

How to prefill the command prompt with some chars?

In a batch file, I want to open a command prompt (and keep it open), and prefill the command with the text "git clone", so I just need to copy a project's URL. This is how I open a command-prompt and ...
user avatar
1 vote
1 answer
2k views

Running and saving command output using VBA

I am trying to run shell commands from VBA and get output into a csv file. Below is the code I am using: Dim wsh as Object Set wsh = VBA.CreateObject("WScript.Shell") plink_path="C:\plink.exe" ...
anurag's user avatar
  • 626
3 votes
2 answers
7k views

Windows Product Key - Different answers from different techniques

Following on from this question (which asks how to retrieve a Windows Product Key), there seems to be conflicting information obtained from the various methods. This question asks why is there a ...
3-14159265358979323846264's user avatar
2 votes
0 answers
933 views

Calling multiple command-line commands from vbscript / wscript in a single shell instance

I'm trying to improve the performance of my vb script. I need vbs to programmatically transform and import xml files into an MS Access database, and that works fast. After I run an xsl transform on a ...
Oleg's user avatar
  • 303
1 vote
1 answer
989 views

Default settings for CScript.exe

How can I make CSript.exe run my scripts with /K by default? Also is it possible to set default settings for how will the cmd window appear?(maximise window, pick font, size etc.) UPDATE: I heard ...
sgp667's user avatar
  • 1,827

15 30 50 per page