vbscript

Recursive list with vbscript

I have a csv file with userid and manager fields. How can I list all userids that report to a specific manager and its direct reports, drilled down to the last user. Need a quick vbscript. Thanks. ...

Does VBScript's IsEmpty have an equivalent in JavaScript?

Using Javascript, is there an equivalent function or functionality so VBScript's IsEmpty function? The VBScript function returns whether the given variable is "empty", e.g. since all the variables are actually VARIANTs, whether or not the VARIANT has a vt of VT_EMPTY, whereas most of what I've found for Javascript is string-specific or ...

How to check if Outlook is running, using vbscript

Hi, How to check if Outlook is running, using vbscript, I need this for my installation procedure to ask the user to close outlook before installing my application. Thanks, ...

List Keys in JScript object using VBScript (Classic ASP)

Hello, I am using the JSON2 script in an asp page to parse JSON post data. After parsing the data, I have an object in VBScript that allows for notations such as: jsonData.key I wish to parse through all the keys, however, I have no knowledge of the key names. How would I go about doing this? Example JSON: { "dbtable":"TABLE1", "dbco...

vbs to get data from api call

Hi there, Here's an issue on retrieving returned api call data. I found that Request.Form("param2") not working. Eg: inside .vbs script that run in a windows server, I do an api call to external script. Then the api script return a string data. Eg: param1=baby;param2=banana;param3=haha I found that inside .vbs, if I use request.form,...

Adding folders to Outlook's Favorite Folders list

I'm trying to add a Public Folder to Outlook 2007's Favorite Folders list using VBScript. This is what I've hacked together using code I found in an Experts Exchange article: Const olPublicFoldersAllPublicFolders = 18 Const olMailModule = 158 Const olFavoriteFoldersGroup = 4 Set objOL = CreateObject("Outlook.Application") Set objNS = ...

Funny CSV format help

I've been given a large file with a funny CSV format to parse into a database. The separator character is a semicolon (;). If one of the fields contains a semicolon it is "escaped" by wrapping it in doublequotes, like this ";". I have been assured that there will never be two adjacent fields with trailing/ leading doublequotes, so this...

How to determine amount of time it takes for a system to completely boot up?

In my company, we run several startup scripts when users login - in addition to the various TSR applications. I attempted to create a script (vbscript) that would allow me to output the the two times (or calculated time) into a text file located on the network share. This would allow me to trend startup times - since I get complaints c...

Checking VBScript syntax

Any good utilities out there for verifying VBScript syntax without actually running the script? What I'm getting at is if I do something like: If (year == "2005" && type == 1) Then ... End If Is there a tool that will tell me that the '&&' really should be 'And' and the '==', just '='? ...

Operating System VBS Script

Does anyone have sample VBS code that creates a switch statement based on whether the client OS is Windows XP, 2000, NT, or 95? ...

ASP - Using Function parameter to refer to recordset

Sorry if the title is a bit vague. I couldn't think how else to say it! I have a script which retrieves data into 3 different recordsets. They are called rs1, rs2 and rs3. I have quite a large piece of code later on in the script so I have created a function to save save space etc. Within the function I wish to use the information fro...

Creating the shortest possible case-insensitive verification number

This is going to be a little long and rambly, but I want to make sure everything is in the proper context. Back in 2004 I wrote an online Learning Management System using Classic ASP and VBScript. I'm now working on some upgrades (and periodically asking myself WTF I was thinking when I wrote various segments of code...), and I want to ...

Classic ASP/VBScript implementation of Crawford's Base32 Encoding

Moving on from the first part of my problem, I'm now working on trying to write a Classic ASP/VBScript implementation of Crawford's Base32 Encoding. Time is tight on this particular project, so while I am working this out on my own, I'm hoping someone has something readily at hand (or can at least whip one up faster than I can). ...

How do I programmatically change workstation's ip address?

There's probably some nice way of doing it (in Windows XP) in VBScript (or some other scripting language) with registry tweaks. Anyone know how? ...

Reliably convert a string to a double independent of regional settings in classic ASP?

I'm working on a legacy classic ASP interface between our client application and the server. This is not a website, just an intermediate layer in ASP (I know this is not the preferred way of doing things, told you it's legacy and it can - unfortunately - not be changed at this point). So I'm sending a double value as a parameter on the ...

Need assistance padding numerical month and day with leading 0

I am working within a batch file and need to pad a single digit with a leading 0 if under 10. I have the values in environmental variables. They are month and day, I need to pad to match file structure I am working against. I am using vbscript to return a date that comes back in the following format "7/16/2009". Need it to look like ...

How can I scrape this frame?

If you visit this link right now, you will probably get a VBScript error. On the other hand, if you visit this link first and then the above link (in the same session), the page comes through. The way this application is set up, the first page is meant to serve as a frame in the second (main) page. If you click around a bit, you'll see...

What is the simplest built in way in windows to copy and rename files where the rename involves appending some before the extension

I have a directory (source) with a bunch of files and these two dlls file1.dll file2.dll I want to copy these to destination but on the copy have them renamed file1_a.dll file2_a.dll Basically append _a to every dll copied I need a very basic way to generate this script with a batch file Can't use perl because it's not b...

vbscript return empty data

Hi there, I am using vbscript .vbs in windows scheduler. Sample code: objWinHttp.Open "POST", http://bla.com/blabla.asp, false objWinHttp.Send CallHTTP= objWinHttp.ResponseText strRESP= CallHTTP(strURL) WScript.Echo "after doInstallNewSite: " & strRESP Problem: blabla.asp is handling a task that need around 1-2 minute to complete...

How do I programatically change the "underline keyboard shortcuts" Control Panel setting?

In the "Control Panel > Ease of Access Centre > Make the keyboard easier to use" is an option to "Underline keyboard shortcuts and access keys." Is there a way of programatically switching this on and off? I'm using Visual Basic Scripts, but can use .NET. ...