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).
1,075
questions
0
votes
1
answer
336
views
How can I split the file and output it with Webpack? This is to avoid the WSH capacity limit
I'm not native English, so I'm sorry if it feels difficult to read.
I am creating a library.
https://github.com/standard-software/partsjs/tree/v9.2.0
I'm building with Webpack and it's comfortable to ...
-2
votes
1
answer
177
views
Proper file transclusion for classic JScript
I want to have something like C's #include directive or Python's import() function. I would appreciate it if you consider that this is not a Javascript, VBScript, nor a JScript.Net question. I want ...
-1
votes
1
answer
272
views
One WSH JScript instance to communicate to the StdIn and StdOut of another instance
I want a JScript instance to send a string to the StdIn of another JScript instance; let the other one processes it and then read the returned StdOut results. Consider the code block below:
// ...
2
votes
1
answer
6k
views
What is the difference between new ActiveXObject() and WScript.CreateObject()?
According to the Microsoft documentation, one can create instances of the COM objects using both the ActiveXObject() and the WScript.CreateObject() functions. It seems like the lines
var objXL = new ...
3
votes
1
answer
265
views
VBScript passing value by reference (VarPtr) to ActiveX function
I'm trying this:
Dim oApp
Dim iReturnedResult
Set oApp = CreateObject("Some.Application")
Set F_Ord = oApp.Documents.Open("Window 1", VarPtr(iReturnedResult))
The ActiveX ...
3
votes
1
answer
609
views
What options can be specified in `.wsh` files?
I am following this nice tutorial, part of the "Microsoft Windows Script Host 2.0 Developer's Guide" online book by Günter Born. There he mentioned the interesting .wsh files where one can ...
-1
votes
3
answers
10k
views
VBA - WScript.Shell - Executing A PowerShell Command
I want to execute a PowerShell Command from VBA using WScript.Shell
Here is the string that gets sent to WScript.Shell:
Powershell -ExecutionPolicy Bypass -Command $FilesInPathway = get-childitem -...
3
votes
2
answers
10k
views
Use PowerShell to create a shortcut to launch a PowerShell script
I have a need to create a shortcut on a Windows 2019 Server for the Eclipse application so that it runs a PowerShell script instead of opening Eclipse. The script runs a few commands first and then ...
-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 ...
0
votes
1
answer
527
views
How to change the url of already opened chrome tab from internet explorer?
I have a web application and this app works on IE browser and i want to open a chrome browser from IE and later change the tab URL. It is like window.open() but in Chrome. I found the way to open a ...
0
votes
0
answers
298
views
Set registry key in VBS
So my problem starts off with me trying to clear my screen in cscript. I want to make a clock program, but I want it so you don't need to set a registry key to use it.
strComputer = "."
Set ...
-2
votes
1
answer
278
views
SSIS can't run create excel file or save as copy excel file as a VBScript fine, (no error but nothing changed after execution)
I have SSIS package that run the VBS file and this file includes:
CreateObject("Excel.Application")
xlWorkbook.SaveCopyAs
commands.
Under my security privilege everything goes fine (I am ...
3
votes
2
answers
3k
views
How do you do an alert / message / popup box using JScript on Windows?
I'm trying to do a Window alert on Windows 10 and it's not going so well.
This is what I tried:
window.alert("Alert");
And
alert("Alert");
It doesn't matter if its in another ...
0
votes
0
answers
141
views
Wscript.exe task stacks and stresses CPU
SOLVED:
I realized, that the process 'wscript.exe' is not essential to keep the program running if you let it sleep, so I just kill it with a batch file within the script after the ActiveXObject has ...
0
votes
2
answers
238
views
Why is my VBScript throwing nine Pop Ups instead of one? [closed]
I have a Win7 64 bit Windows Professional Laptop. I have a VB Script taken from the net and with certain alterations I am trying to get at Link speed for all Adaptors on my Laptop. The Vb script ...