vbscript

Writing VB script under HP's QTP-11

Hi, I'm still a novice at QTP (still learning even the GUI) and I need to write this VB script under it: Write a QTP script that: Browse to Yahoo mailbox Perform registration process to Yahoo if this is a new user Perform log in to yahoo mailbox if it is existing user Send new mail to valid Mailbox Use Englis...

Variable scope in VBScript functions

I have a question about variable scope in VBScript. I know there's the following keywords (from autoitscript.com): Dim = Local scope if the variable name doesn't already exist globally (in which case it reuses the global variable!) Global = Forces creation of the variable in the Global scope Local = Forces creation of the variable in ...

C#.NET console app (.exe) versus VBScript (.vbs) for Scheduled Tasks

I have the following VBScript: Dim strFile, strXPath, strNewText, xmlDoc, xmlNodes, xmlNode strFile = "C:\folder\cats.xml" strXPath = "/list/cat/@LAST_BATH" strNewText = Now Set xmlDoc = CreateObject("Microsoft.XMLDOM") xmlDoc.Async = "False" xmlDoc.Load(strFile) Set xmlNodes = xmlDoc.selectNodes(strXPath) For Each xmlNode in xmlN...

VBS Microsoft.XMLHTTP status

Why does the following code give a 80004005 error when run? I'm trying to get the status of several sites every 10 seconds...(the ones given are examples). 'http://www.sebsworld.net/information/?page=VBScript-URL 'http://www.paulsadowski.com/wsh/xmlhttp.htm 'the array of sites sites = Array("http://www.google.com/","http://en.wikipedia...

Is there a way to programmatically grab a list of meeting attendees from Outlook?

Hi I am trying to grab a list of meeting attendees from Outlook 2003. I am open to using any language that would be appropriate. Scripting languages are preferable. Any suggestions? ...

How can I check to see if the active window is maximized with vbs?

When I'm working, I want to be able to maximize or restore a window. But I only want to use one shortcut key to do it. I am currently using the below code to perform the function of maximizing. However, if the window is already maximized, this won't 'restore' the window. Set oShell = CreateObject("WScript.Shell") oShell.SendKeys "% ...

vbscript inserting a line alphabetically

I'm trying to insert a string that begins with the word title as in title: New string to be inserted into a file that has the following format. A bunch of text at the top, a block of lines each beginning with the word title:, and a bunch of text at the bottom. Some content here at the top And more content and the titles will begin ne...

Running cscript.exe from C# .ashx does not execute code in vbscript file

EDIT I added in some error handling to my .vbs file and it is indeed a permissions issue (I now get a "Permission Denied error"). However, supplying my credentials in the web.config <impersonate> tag does not seem to have any effect. Also when trying to supply my credentials to the process via via p.StartInfo.Password = Misc.CreateSe...

Retrive msiexec error code from script

Hi, I have 2 problems that i need help with: I need to create a script to get the (error/success) code of an installation with msiexec. Any resources, examples about this? If my WIX Custom Action fails how can i return an error code for the installation? Any examples? Thank you, Adrya ...

Using Vbscript or any other XP supported scripting language how would I restore a application that is minimized to system tray?

I would like to restore an application from the system tray using vbscript or other XP supported scripting language Java S.-etc. This way I could restore the app if running in the tray rather than open a new window. I can use a batch script to check if its running and then run the script otherwise just start the application. The app I...

How to perform multiple SQL tasks when using SQL within code (in this case vbscript)

I am hitting a brick wall with something I'm trying to do. I'm trying to perform a complex query and return the results to a vbscript (vbs) record set. In order to speed up the query I create temporary tables and then use those tables in the main query (creates a speed boost of around 1200% on just using sub queries) the problem is, t...

Testing Username / Password against Active Directory Domain in VBScript?

I need to test a username and password pair against a given domain in a VBScript. The script will know the username, password, and domain against which it needs to check for access, and all I need returned is a true or false as to whether the account is valid. Can anyone suggest a good way to accomplish this? Thanks! ...

how do we open a word file using vb script

could anyone plz tell me how to open word files using vbs windows scripting. I tried out these two set of vbs, but windows script Host error ("The system cannot find the file specified", errorcode: 80070002) is getting displayed eventhough the file exists at the specified location. the first vbs i tried out: Dim sAppPath Dim sPrgFolde...

VBScript to Zip all files in a folder/sub-folders while preserving the original file name

I'm wondering if someone has a script to zip all the files in a folder and it's sub-folders while maintaining the original filenames? So basically for every file within the folder, I would want a corresponding zip file created. I've never used VBScript before so I'm not sure how this can be done and would take a me quite a while to figur...

jQuery AJAX and VBscript - Can't get values in VBscript variables when using POST in the jQuery AJAX

I am having trouble getting the VBscript on a .asp page to assign values to variables which are sent by the jQuery ajax() function. I have this code on several other sites and it works fine, but for some reason it won't work on this website. Just in case it makes a difference we are running the sites through IIS7. The issue is that th...

Regular Expression Rules in Outlook 2007?

Is it possible to create rules in Outlook 2007 based on a regex string? I'm trying to add a filter for messages containing a string such as: 4000-10, a four digit number followed by a dash and then a two digit number, which can be anything from 0000-00 to 9999-99. I was using this as a regex: \b[0-9]{4}\-[0-9]{2}\b but the filter isn...

how to reference home folder on visual basic script.

Let me start by saying that I'm a linux guy and not really familiar with VBS or even windows global variables. I'm being called upon to update a VBS script which basically copies the latest version of a access form to the computer. Currently it puts this access form in C:\MedMaint. The problem is that we do not run as administrators...

Find certain value in excel and add entire row below it using Vbscript

What i'd like to do, is write a VB macro that will scan the entire column (Column F) searing for "Year Total:" and then insert an entire row below it. I have this: Sub Macro2() ' ' Macro2 Macro ' ' Keyboard Shortcut: Ctrl+a Dim C As Variant Dim FirstRow As Integer With Worksheets(1).Range("F1:F4000") Set C = .Find("Year Total:", ...

jQuery AJAX and VBscript request.form

I am having some trouble sending values from one page to another using the jQuery ajax() function. For some reason the request.form on my VBscript page won't pick up the data I send using the ajax() function in jQuery. Here is my javascript function which is called in an onsubmit event in my form: function sendData() { $.ajax({ typ...

What is the difference between vbscript and vb.net?

What is the difference between vbscript and vb.net? ...