wsh

How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN?

How do I get a list of the active IP-addresses, MAC-addresses and NetBIOS names on the LAN? I'd like to get NetBIOS name, IP and MAC addresses for every host on the LAN, preferably not having to walk to every single PC and take note of the stuff myself. How to do that with Windows Script Host/PowerShell/whatever? ...

Possible to monitor processes another process launches via WMI?

I have a setup executable that I need to install. When I run it, it launches a msi to do the actual install and then dies immediately. The side effect of this is it will return control back to any console you call it from before the install finishes. Depending on what machine I run it on, it can take from three to ten minutes so having t...

Send To/Mail Recipient from WSH

I am trying to implement in windows scripting host the same function as windows Send To/Mail Recipient does. Did not find anything usefull on google except steps to instantiate Outlook.Application and directly calling its methods. I need to go the same path as windows do, as there is a mix of Outlook and Lotus Notes installed, I don't s...

Send mail from a Windows script

I would like to send mail from a script on a Windows Server 2003 Standard Edition. I think the server setup is pretty much out of the box. The mail server is an Exchange one, and when you're on the internal network you can use plain old SMTP. I have done it from my machine with Perl, but unfortunately Perl is not available on the server...

Writing a language for the Windows Scripting Host (WSH)

Has anyone had any experience targetting WSH in the way that VBScript, JScript, PerlScript, xbScript and ForthScript (among other) do, such that the language can be used from the command line and embedded in server-side web pages? Where do I go to get that kind of information? ...

Retrieving DLL Metadata from VBScript?

Using only VBScript (launched from Windows Scripting Host) can I pull the DLL metadata from kernel32.dll? Specifically, I'm looking for the version info and the architecture specified in the DLL header. Can this be done without any dependencies? ...

Access DB5 to MySQL automatically

Hello I have a problem, and was hoping I could rely on some of the experience here for advice and a push in the right direction. I have an MS Access file made by propietary software. I only want to take half the columns from this table, and import into new(not yet setup)mysql database. I have no idea how to do this or what the best way...

How do I use WScript.Shell SendKeys to send Number Pad key strokes?

I am trying to use WScript.Shell SendKeys method to emulate sending a key press from the Number Pad. I have an application that I am writing automated testing for using QTP. It is a Web Browser based application and the input is into a Java App within the web page. The input only accepts key presses from the Number Pad and the Enter k...

WSH mapping drives leaves default path set

I wrote the following javascript to put in my startup folder to work around some problems with mapping drives. Unfortunately it has the side effect of starting command prompts with H:\ as current directory. How can I get around this? var objNetwork = WScript.CreateObject("WScript.Network"); /* Remove Network Drives */ try { objNe...

RegDelete cannot delete Registry key in WSH 5.7

Based on the advice provided at http://www.tweakguides.com/VA_4.html to prevent Windows Vista from "intelligently" rearranging column formats in Windows Explorer, I have written a script to automate the process a little. Dim WshShell Set WshShell = WScript.CreateObject("WScript.Shell") 'Remove the "filthy" reg keys first. regKey = "HK...

How can I programatically analyze (and change) the configuration of IIS

I'm relatively new to the Windows Server world (coming from *nix land). I'm used to analyzing a web-server's configuration by grepping through an apache config file. Is there an equivalent file/group-of-files for IIS? Lacking that, is there an official scripting interface for IIS? ...

WSF and ADO with DB2 , recordset.MoveNext not supported error in vbscript

I am trying to loop on a recordset returned from db2 using a .wsf file and vbscript . the vbscript libfile(lib.vbs) is as follows '*************** Const ADOCon="Provider=IBMDADB2.1;Password=*****;User ID=*****;Data Source=yourdatasourc;" '************************ 'ADO environment is Initialised here '************************* F...

Using 32-bit COM object from C# or VBS on Vista 64-bit and getting error 80004005

I need some mind reading here, since I am trying to do what I do not completely understand. There is a 32-bit application (electronic trading application called CQG) which provides a COM API for external access. I have sample programs and scripts which access this API from Excel, .NET (C++, VB and C#) and shell VBScript. I have these ...

Windows XP: Replace the standard "New Folder" action with a WSH script

Problem: I have a custom WSH script that creates a new directory in a similar manner to the standard "New Folder" action in the Windows desktop. This script, however, does a couple of extra things; such as allowing me to create a pre-defined set of child directories (optional); as well as allowing me to add notes and reminders if the dir...

A .bat or .wsh script that can search for files

I am looking for some examples of a .bat OR .wsh script that can do the following: Recursively read file names in a directory with a user-provided extension (.dll, .exe, etc) Search a user-provided directory for the above file names Generate a txt or xls report of the findings, like: x.txt was found in "C:\temp", "C:\blah" TIA. EDIT...

How to read a registry value whose name is a file path using WshShell.RegRead

I am writing some javascript to be executed by the Windows Scripting Host, and I need to be able to read the shared file counts from the registry for certain specific DLLs. The registry key and values look like this: [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\SharedDlls] "C:\\Program Files\\Common Files\\ACME Corp\\...

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? ...

Base64 Encode String in VBScript

I have a web service load driver that's a Windows Script File (WSF), that includes some VBScript and JavaScript files. My web service requires that the incoming message is base64 encoded. I currently have a VBScript function that does this, but it's very inefficient (memory intensive, mostly due to VBScripts awful string concatenation) ...

Prompt dialog ??

How to open a prompt dialog box in WSH usig JSacript?? The only pop-up dialog I've found in the doc is the WshShell.Popup() method. But I need a way to request the user to enter a string, like the window.prompt() method in DOM. Thanks. ...

Implementing IProvideClassInfo on C# COM Object

I'm trying to implement the IProvideClassInfo on a C# COM object so it's events can be used from Windows Script Host (WSH). I've managed to implement the interface and trace a call in to my GetClassInfo method. However, hooking up the events fails with "Cannot connect object". Has anyone managed to do this? This is my script code (JSc...