vbscript

How to call web service using vbscript (synchronous) ?

Actually there many examples and I have used one of them. But it works asynchronous, I mean it is not waiting the function that I called to finish. function ProcessSend() Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.4.0") Set oXMLDoc = CreateObject("MSXML2.DOMDocument") oXMLHTTP.onreadystatechange = getRef("HandleStateChang...

Windows Scripting: VBScript, DOS, JS, Python, ...

Say you were mainly a C-syntax like programmer and Linux systems administrator, and you were tasked with creating some simple automation tasks on Windows (monitoring of back-up files, process monitoring, ...). Which language would you prefer to write your scripts in? There's a large collection of VBS-scripts out there (using VB syntax), ...

Web page download automation in vbscript

How would you automate logging into a website and downloading a page using vbscript? ...

How to create BinaryArray in VbScript?

I want to manually create a binary script and then save it as binary file. I want to append all of the following bytes and create a binary file out of them. &HF0 &HF1 &HF2 I want to able to do something like this : Dim generateData(3) As Byte generateData(0) = &HFF generateData(1) = &HFE generateData(2) = &HFC But obviously As B...

VBScript Compressor / Packer

I'm looking for a VbScript compressor / packer. Basically I want to shorten the VBScript code. Could you recommend a tool for this? ...

vbscript : registry directories and keys listing

If I have a registry pathing of: HKEY_LOCAL_MACHINE\SOFTWARE\INTERSTAR\XFILES\CONFIG MANAGER\SYSTEM\COMPANIES How would I go about listing all the records under that path/directory and access the DWORDs, REG_SZs and data? thanks in advance ...

How do I check if wscript/cscript runs on x64 host OS?

I'm running a VBScript that may run under x64 Windows. I need to read a registry key from the 32-bit part of the registry. For that I use path HKLM\Software\Wow6432Node\xyz instead of HKLM\Software\xyz. How can I check if the script is executed under x64? ...

Multiple Classic ASP SessionID's when using both AJAX and standard HTML POST requests.

I'm using Classic ASP and a bit of AJAX to post the contents of a form back to the page on which the AJAX form lives. Upon AJAX POST the page saves one of those fields (email, to be specific) into a Session variable. The user then goes about their business - perhaps requesting the page again via normal HTTP. However, this leaves my brow...

QTP: Object Required errors when Object is valid

I have the following VBScript in a reusable action: 'Gather links Browser("1").Navigate "http://InternalWebmail/something/inbox.nsf" set oDesc = Description.Create() oDesc("micclass").Value = "Link" set links = Browser("1").Page("Webmail").ChildObjects(oDesc) Dim links2 links2 = "" 'Filter out irrelevant links For i = 0 To links.Count-...

Calling Webservice with authentication using vbscript

How do I get username and password in webservice when I use vbscript code as below. call oXMLHTTP.open("POST","http://localhost:11883/ServiceCall.asmx/GetEmloyee,false,testUser,testPasword) ...

How to Export binary data in SqlServer to file using DTS

I have an image column in a sql server 2000 table that is used to store the binary of a pdf file. I need to export the contents of each row in the column to an actual physical file using SqlServer 2000 DTS. I found the following method for vb at http://www.freevbcode.com/ShowCode.asp?ID=1654&NoBox=True Set rs = conn.execute("selec...

automatically query and convert access db table to excel using vbs

I have an Access database. I would like to automatically query the table Data_01 and export the results to an Excel spreadsheet using ADO in VBScript on a daily basis. At present my skills in ADO are lacking. I have a date time column that I would select items from yesterday and today. In a GUI query the criteria would be Between Date(...

Are there any avantages to using Call when calling a function in VBscript?

Forgive me if the answer is obvious as it has been a long time since I have programmed vbscript. Are there any avantages to using Call when calling a function in vbscript? For example: SomeFunction param1, param2 vs Call SomeFunction (param1, param2) ...

How can I convert javascript to vbscript?

HI, How can I convert javascript in to vbscript? I am making a script entriely using vbscript. But for some sections i got code in javascript. ...

How to remove registry entry from Windows 2008/Vista

Hi, I have this script to run on Windows 2008/Vista to remove one registry key, but I can't get it to run: Const HKEY_CLASSES_ROOT = &H80000000 strComputer = "." strKeyPath = "Installer\Products\334A4D1453680B74CA87BEE6B7E40113" Set objRegistry = GetObject("winmgmts:\\" & _ strComputer & "\root\default:StdRegProv") DeleteSubkeys...

How can I script copying files from Unix to Windows?

Is there any way a script can be made that copies files from a Unix drive onto a Windows drive? ...

Making calls and passing values to a vbscript from a ruby script

Is it possible to call a vbscript from a ruby script? Bascially, I am creating a temp folder with a random name in my ruby script and I would like to call the vbscript and pass the name of this folder to carry out the next action. ...

Changing an IIS6 website directory remotely

First, the prior situation: We have this project with a one-click build script. It's cobbled together with TFS Deployer + PowerShell + VB Script. TFS Deployer sits on the production machine, copies the new website files into a brand new directory, and then calls a VB Script that changes the IIS website to the new directory. Now, I'm ...

How do I export an Access database in CSV format?

I have an Access database which I would like to export to a text file. I have a schema defined within Access, and currently use a macro to export it. I would like to use VBScript to always append the result of a query to the same file. If it is not possible to use my defined schema, I only need the fields to be comma separated and enclos...

how to access SVN using VBScript

We'r maintaing some test scripts written in VBScript in SVN and everyday morning we get the latest copy of these files and run the tests. We are doing this manually at the moment. However we want to automated this whole operation. How do we access SVN using VBScript to copy the latest code back to the test machine? Is there any API th...