windows-scripting

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

IWshShortcut Target Resolution in Windows 7

I've got some code to read shortcuts using the Windows Script Host, but it appears to have a problem in Windows 7. When reading shortcuts, if there is an environment variable in the target path, it resolves to the wrong drive. For example, the shortcut to Notepad resolves to D:\Windows\system32\notepad.exe instead of C:\Windows\system32\...

Good IDEs for windows scripting

There are any good IDE for windows scripting (VBS)? ...

Best method to obtain current memory configuration in VBA

I am attempting to get the current users RAM configuration. I would like to use VBA to look this up and then store it in a table. I need the number of chips along with the amount of RAM on each chip. Is this possible to lookup programmatically using VBA? Do I need to use Windows Script Host? ...

How can I create a javascript library in a separate file and "include" it in another?

First, a caveat. The main script is not run in a webpage. I will be running the .js file in Windows using Windows Script Host. The problem: I would like to create a javascript "library" containing a number of objects, each with a number of functions. I expect this library will get rather large with time and would like to keep it in a se...

How to check if the files exist on the FTP server ?

I have a ms-access application, now I need to check if that file had already uploaded before and then change the status of that record, is any tools or command we can use to check if the file exists? Or even some other appliaction I can use on windows and be able to update the records in the SQL server database. Environment: Ms-Access ...

How can I run a Windows shell script prior to launching an application?

Is there a way to configure an application shortcut so that a Windows shell script is run prior to kicking off the application? In my case, I want to back-up some files before the application runs. Thanks! ...

FTP files in Windows Scripting Host?

Hi What is the recommended way to transfer files via FTP and manage (rename, move, delete) files in an FTP server programmatically in a Windows Scripting Host script file (JavaScript/VBScript)? Preferably without requiring 3rd party ActiveX add-ons since these "extra" software will need to go through an approval process that will take ...

Is there a way to get access to a window handle in windows using WSH, or WMI or similar?

Is there a way to get access to a window handle in windows using WSH, or WMI or similar? I just want to flag a window as always-on-top. Ideally I'd use windows script host for this. Please note, I don't want to install PowerShell on the system in question. We are nervous about any additional software and already have some VBS files inv...

svn update: can I iterate the results?

I'm using svn in a script (Windows scripting .cmd file). Currently it checks out all files to a folder, then iterates that folder adding all the files to a master file as part of a build process. Something like: svn checkout --username %username% %SVNURL% %workingfolder% FOR %%i IN (%workingfolder%\*.*) DO TYPE %%i >> %DESTFILE% What...

Problem creating simple "windows script components" on Windows 7.

Hi folks, I'm trying to get a Windows Script Component working on and x64 development machine. Works fine on x32 bit. But can't seem to get it running, I have the same problem with both JScript and VBScript. Here's the most simple wsc component possible. All that it does it pop up "Hello" in a message box. If you save the snippit below ...

using Windows Script Host

Hello, 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 Object Model (from c:\windows\syswow64\wshom.ocx), it generated Interop.IWshRuntimeLi...

Control Windows VM from Linux Host

I am looking for a tool that will allow me to monitor and control programs running inside a Windows VM from the Linux host machine. I realize that this is similar to what a rootkit would do, and I am completely happy to use some hacker software if it provides the necessary functionality (and if I can get it in source-code form). If I ca...

Concatenate a variable with a string

Hello all, I wrote a small bat file: @echo off rem runs the {arg[0].exe} - using its fully qualified name %~f1 IF %errorlevel% NEQ 0 (set boolResult=False) ELSE (set boolResult=True) rem case1 EVENTCREATE /T ERROR /ID 700 /L "MyTest Application" /D "exitcode: %errorlevel%; session id is %SessionName%" rem case3 EVENTCREATE /T...

Unable to parse variable length string separated by delimiter

Hi, I have a problem with parsing a string, which consists only of directory path. For ex. My input string is Abc\Program Files\sample\ My output should be Abc//Program Files//sample The script should work for input path of any length i.e., it can contain any no. of subdirectories. (For ex., abc\temp\sample\folder\joe) I h...

Getting USB Storage Device Instance ID (unique ID) programmatically

Whenever user plug a USB mass storage device, how to get the Device Instance ID (unique ID) of that particular device programmatically? ...

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 how important is it to a modern developer working full time with C++/C#/Java? ...

Windows scripting to parse a HL7 file

I have a HUGE file with a lot of HL7 segments. It must be split into 1000 (or so ) smaller files. Since it has HL7 data, there is a pattern (logic) to go by. Each data chunk starts with "MSH|" and ends when next segment starts with "MSH|". The script must be windows (cmd) based or VBS as I cannot install any software on that machine. F...

Remove all redundant files in a directory

I have directoryA that gets populated as a replica of directoryB, and some files are changed or added. I want to automate the process of deleting all files from directoryA that have redundant copies in directoryB. Both directories have several layers of sub-directories, so the solution will likely have to be recursive. My first thought...

How to script a new toobar in Windows 7?

http://social.technet.microsoft.com/Forums/en/w7itproinstall/thread/05c6c353-a335-485b-bb79-418b1ba009b6 Is it possible? ...