Skip to main content

Questions tagged [wsh]

For questions relating to Windows Script Host (WSH), a language-independent scripting host for the Windows operating system. It allows scripts to be run from both the graphical Windows desktop (via WScript.exe) and the command prompt (via CScript.exe).

wsh
2 votes
4 answers
13k views

SAP GUI script opens an Excel window and I can't stop it

I'm trying to automate SAP GUI export to an Excel file, which in turn is then used by another Excel file with some VBA code to automate filtering and formatting the data. I've got it all running, ...
0 votes
4 answers
2k views

Starting and minimizing Quake Terminal at startup

I'm trying to create a WSF that I can run using Task Scheduler at login. I want it to open the Terminal, switch to Quake mode, minimize that and then close the orignal Terminal window. I've got as far ...
0 votes
0 answers
46 views

Use VSCode to debug Windows Script Host scripts

Is there a way to configure VSCode to allow me to debug old JavaScript (JScript?) or VBScript routines that run in the Windows Script Host? I'd like to step through the code of each of these scripts ...
0 votes
1 answer
10k views

How to write a script to automate Putty (PLINK) on Windows 10

I am doing a manual process that is done each day within Putty and wanted to automate it. There is no need for a person to do this because all of the keyboard inputs do not change each day. I'm trying ...
0 votes
2 answers
10k views

VBScript and batch file fails when run by Task Scheduler

I have a VBScript that checks to see if MS Word is running hidden, makes it visible, then hides it again. here is the script code that works fine when I double click the file in Explorer: dim oWord ...
0 votes
1 answer
67 views

WSH/Javascript: how to access collection items [duplicate]

I am writing a JavaScript that shall be executed in Windows Scripting Host on the command line with cscript.exe. I need JSON parsing, so I decided on JavaScript instead of VBScript. Now I am trying to ...
1 vote
2 answers
4k views

Is there a way to run a popup window while a script runs?

I am creating a gui, and want a popup to let you know it's busy, but then close when it's completed that specific task. The only thing i can find is the following... $popup = New-Object -ComObject ...
0 votes
0 answers
24 views

VBScript, how to put a dictionay inside another dictionary using .Item setter? [duplicate]

A.S. this is NOT dup: How can I use a dictionary inside a class in vbscript? i do NOT want to make new classes i also do not want to make ad hoc wrappers (would i - i would just use array(1) instead ...
-1 votes
1 answer
30 views

How to list all environment variables in JScript [duplicate]

My prog.js looks like this: var WshShell = WSH.CreateObject("WScript.Shell"); var env = WshShell.Environment("PROCESS"); WSH.Echo(env.Length); // 46 WSH.Echo(env("OS")); ...
14 votes
5 answers
88k views

VBScript getting results from Shell

Set wshShell = WScript.CreateObject ("WSCript.shell") wshshell.run "runas ..." How do I get the results and display in a MsgBox
1 vote
1 answer
500 views

Unable to deploy WSF/PHP WebService on WSO2 ESB

few days ago I started to work on my own WebServices. I decided to use WSO2 WSF/PHP framework and according to http://wso2.org/project/wsf/php/2.0.0/docs/manual.html created my first helloService. ...
9 votes
1 answer
6k views

How can I use JScript to create a shortcut that uses "Run as Administrator"

I have a JScript script that runs using cscript.exe. It creates a shortcut on the desktop (and in the start menu) that runs cscript.exe with parameters to run another JScript script. It looks, in ...
0 votes
0 answers
51 views

Unable to redirect output from VBA with cmd in hidden mode

Am trying to redirect output from cmd to a text file using Wscript.shell script. It works when cmd window is in active mode. But doesn't work with cmd windows style is 0 (hidden mode). Dim objShell : ...
15 votes
7 answers
54k views

Get the Windows Download folder's path

I have some Excel VBA code that requires knowing the Downloads folder path. How could I do it? Since you can move around the Downloads folder (and also Documents and most of those folders, via the ...
-2 votes
1 answer
727 views

How to access JSON object returned from createObject("htmlfile") in VBS file

I have the following json: { "columns":[ "b_summary", "end_fy", "id", "isin", "market", "name&...

15 30 50 per page
1
2 3 4 5
72