All Questions
Tagged with wsh windows-scripting
36
questions
1
vote
1
answer
203
views
Where can I find the doc for the function GetObject in Microsoft Javascript?
I cannot find the doc for the function GetObject available in Microsoft Javascript.
I tried with no luck https://learn.microsoft.com/en-us/search/?terms=javascript%20getobject where I found https://...
3
votes
1
answer
7k
views
Define and call Wscript function inside Javascript file to run in Windows Script Host
I need exactly like I asked in question title.
I have a javascript file for calculating Thanksgiving date for every year, provided the year value input.
Now I want this javascript to be executable ...
0
votes
0
answers
34
views
Securely launch local application from IE or alternative ways?
I am facilitating an information system project in intranet environment( with internet access for many users), in which user can print barcode labels from a web interface.
The current method our ...
3
votes
3
answers
3k
views
How to minimize window?
How to minimize window?
I am making HTA application and I want replace window title bar with my custom one.
I've disabled it by HTA's "caption=no" option and placed my own minimize/maximize/close ...
6
votes
3
answers
3k
views
Does JScript support string trim method?
Whilst developing a Windows procedure using JScript, it seems that some string methods fail to work. In this example using trim, line 3 generates the runtime error:
"Object doesn't support this ...
1
vote
1
answer
101
views
JScript is crashing with a very poor reason given
I have the following code which works should theoretically work well:
var arg = WScript.arguments(0);
alert(arg.toString);
So when I run it in CMD, like this:
hello_world.js "Sup"
It'll get a ...
0
votes
1
answer
122
views
Create windows script to traverse all subfolders of some folder, and delete a certain folder and all of it's contents if it exists
here's the trick. Supposing I want to free up some space, and run that script in F:\UnrealProjects, which has a bit over 50-60 subfolders, I would like that script to traverse all of it's subfolders, ...
0
votes
1
answer
518
views
How to convert a string to a variant in jscript under wsh?
I need to append a string of text to the end of a binary file.
This is what I'm trying:
inStream = WScript.CreateObject("ADODB.Stream") ;
inStream.type = 1 ;
inStream.open() ;
inStream.LoadFromFile('...
1
vote
1
answer
888
views
WScript.CreateObject crashes Windows Scripting Host when event handler prefix is specified for WinHTTPRequest
According to the MSDN documentation WinHTTPRequest has four event handlers which should be accessible by specifying an event handler prefix. Unfortunately, doing so causes Windows Scripting Host to ...
0
votes
1
answer
417
views
need to check the version value in text file using vbscript
I have a text file and just need to check version value mentioned in that text file. I have to grep version value (0.0.1) and check that value in VBScript If condition. If version is increased (0.0.2),...
1
vote
1
answer
4k
views
Calling Command Prompt and executing a command through Shell Exec in VBA
I'm trying to execute a command on command prompt using Shell Script in VBA Excel. When I execute this command on command prompt it works by printing a number as output. But when I call the same ...
2
votes
1
answer
193
views
Creating a Windows Script Host Language
Ok, I know I've asked this in the past (and can no longer find that question), and I know I personally have seen many useful articles, documentation and tutorials on how to do this - yet I can no ...
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
328
views
Double-quotes within a string in WSH when using VBScript [duplicate]
How do I insert double-quotes in a string if I am using VBScript in the Windows Scripting Host environment?
Suppose I want to execute this line:
notepad.exe "C:\Some Folder\foo.txt"
How do I write ...
1
vote
1
answer
812
views
How to call/ execute .WSF (windows script file) from browser
My PHP based webpage populates a set of IP addresses from database. I need to run PING command for any IP address clicked by the user from the local machine.
I know its a security issue and browsers ...