Questions tagged [windows-scripting]

Windows Scripting refers to any of the various scripting technologies that ship with Microsoft Windows products.

Windows Scripting refers to any of the various scripting technologies that ship with Microsoft Windows products.

With early roots in browser scripting, these technologies such as , Windows Script Host (), HTML Applications (), and are employed as system administration tools providing methods of automation.

As the name implies, Windows Scripting technologies utilize scripts written in plain-text interpreted code. Windows Scripting can become quite powerful when used to implement other technologies such as (OLE) Automation, Active Directory Services Interfaces (), and Windows Management Instrumentation ().

451 questions
8
votes
3 answers

Loading the TypeScript compiler into ClearScript, "WScript is undefined", impossible task?

I tried using ClearScript to load the TypeScript compiler in order to compile some basic TypeScript code. Unfortunately, when executing the TypeScript compiler source I get this error: 'WScript' is undefined This is the LINQPad program I've used,…
Lasse V. Karlsen
  • 380,855
  • 102
  • 628
  • 825
6
votes
3 answers

Windows shell scripts in C#

I was pretty sure that some months ago I read about the possibility to launch Windows scripts not only the usual .bat, but also .js, .vbs and .cs ! I was willing to try windows scripts in C# .cs files this morning, but I can't happen to find any…
Stephane Rolland
  • 38,876
  • 35
  • 121
  • 169
6
votes
1 answer

How to transmit a secure password over SSH using PowerShell?

I'm writing PowerShell modules that execute commands or scripts over SSH on remote Windows machines, and I'm looking for a way to transmit a password (or other sensitive information) over the connection. For example, imagine that we have a…
Cy Rossignol
  • 16,216
  • 4
  • 57
  • 83
6
votes
1 answer

Is There a Profiler for Windows Scripting Host Code?

Are there any profilers that can profile code that runs under WSH (VBScript, JavaScript, WSF)? Other than hand instrumenting with trace statements, what's a good way to profile code running under WSH?
Patrick Cuff
  • 28,540
  • 12
  • 67
  • 94
6
votes
4 answers

SETLOCAL ENABLEDELAYEDEXPANSION causes CD and PUSHD to not persist

I am trying to use setlocal enabledelayedexpansion and cd together in a batch script, which seems to not persist changes back to shell. The reason I need setlocal enabledelayedexpansion is that I need the variables in the script to be expanded…
Raghav RV
  • 3,938
  • 2
  • 22
  • 27
6
votes
1 answer

using Windows Script Host

I am using windows script host for some kind of installer application and I'm creating shortcuts in start menu with it. This problem came up when I switched to x64 environment (win7 ultimate x64+vs2010) I added a reference to Windows Script Host…
Axarydax
  • 16,353
  • 21
  • 92
  • 151
6
votes
3 answers

Why WScript.StdOut.Write method behaves differently in VBS vs. JScript?

I have two small programs in VBS and JScript: VBScript.vbs: For i=0 To 255 WScript.StdOut.Write Chr(i) Next JScript.js: for ( var i=0; i <= 255; ++i ) WScript.StdOut.Write(String.fromCharCode(i)); When I execute they in the command-prompt,…
Aacini
  • 65,180
  • 12
  • 72
  • 108
5
votes
1 answer

run batch script after windows server restart

I am trying to run a script to startup some services after windows reboot. I have tried one method: copying shortcuts of batch script in shell:startup folder. which eventually will start the scripts automatically but someone has to login to the…
5
votes
2 answers

Adding a logoff script

I have some scripts that I would like to run every time a user logs off. I would like to create something that programatically sets up the logoff scripts. For example, an exe or a cmd file that can be executed to add the logoff script to the list of…
Loduwijk
  • 1,950
  • 1
  • 16
  • 28
5
votes
4 answers

Command Line Script to Delete Header Row from a number of TXT files

What's the best method to delete the first line of text from a large (10k+) group of text files.
guazz
  • 51
  • 1
  • 2
5
votes
3 answers

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 property or method". My code: strParent = " a …
Andrew Shep
  • 69
  • 1
  • 6
5
votes
5 answers

Where does scripting fit in today

I was wondering what place scripting has in today's world of IDEs and GUIs. I'm new to programming and am wondering at what point I should, if at all, open up the PowerShell terminal for a particular task. What do people here use scripting for and…
user360907
5
votes
2 answers

Windows script - run silent but wait for completion / return right code

Here's my situation: I have a BAT file that takes a long time to run (1minute to 70 minutes) I schedule it with Windows scheduler to run every 10 minutes If it schedules again while it is still running, nothing happens (this is good) My problem is…
John Humphreys
  • 37,047
  • 37
  • 155
  • 255
4
votes
1 answer

PrintOut Code Works On PowerShell v 5.1, But Not On 7.3

I am trying to print parts of several docx files. The code below works in Windows PowerShell 5.1, but not in PowerShell 7.3. I would like to understand why and help updating the code so it works in PowerShell 7.3. $path =…
4
votes
1 answer

Restart USB port WITHOUT reboot (DevCon)

UNNECESSARY BACKGROUND INFO: I purchased a new USB microphone (Samson Q2U) and I am having an issue where every time I (re)boot my PC, the mic does not work (it does receive power) until I unplug and re-plug the microphone from the USB port. Now…
Magnum
  • 43
  • 6
1
2
3
30 31