vbscript

Use selectNodes with multiple alternative paths OR combine 2-3 IXMLDOMNODELIST

Hi, Just wondering if anyone would be able to help with the following VBScript script I'm writing: Can I do somthing similar to this: Set obj = something.selectNodes(path1, path2, path3) // Where it will match either of the paths? Or, if not, is there a way I can combine what selectNodes returns (IXMLDOMNodeList)? e.g. Set obj1 = s...

How to ping multiple servers and return their IPs

Hi, I have a txt file which contains a list of different server names (one server name per line). I am wonrdering if I can write a script to ping all the servers and output the IP addresses to a text file. Any hints would be greatly appreciated. ...

Copy a folder from shared drive to another folder using vbscripting

I want to write a script where script can check user home drive(\\server1\home$\user1) path in active directory and go to that path to cut "user1" folder from (\\server1\home$\user1) and paste in (\\server1\home$\Leavers Archive) There are 7 home drives servers and about 100 users. Help on this will be much appreciated. ...

Copy folder contents using VBScript

I am trying to copy the contents of certain folders to another folder using VBScript. The goal is to enumerate a user's AD groups and then copy specific folder content based on those groups. I have code, which is currently not working. Dim Group,User,objFSO,objFolder,source,target,StrDomain StrDomain = "domain.local" FolderBase = "\\...

Launch programs from vbscript

I need to launch programs in my local system using VBScript. But I am having trouble with the syntax. This is what I am using right now - Dim objShell Set objShell = WScript.CreateObject( "WScript.Shell" ) objShell.Run("iexplore") Set objShell = Nothing The above code successfully launches IE. I want to launch other browsers. But, if...

wshshell.run(InstallPath, 0, true) not waiting to finish the installation and continues the script

Good afternoon, I'm working on a project for my company to run an update on the employees workstations. The file is located on a webserver on our domain. The user will click on a link and start up the script. I made two functions one to download the file to the C:\ and another to run the installer. The file is a .exe (I wish it was a ....

How Can I Find Which Process is Displaying a Randomly Appearing Window?

I have a user who randomly gets a Script Error box (shown below) which doesn't indicate what program is having the issue. It'll popup multiple times a day. Any ideas on how to determine which program is failing? He can't determine any consistency about when they pop up. ...

Creating a mailbox in Outlook Express using a script

I remember ages ago ISPs would help you get Outlook Express sorted for your new email account by getting you to download and run a .ini file that contained the settings you need. Now I need to use one, I can't find an example of one anywhere. Any ideas? ...

Connecting to MySQL database with ASP on a virtualized Windows 2003 x64 server

Hi, I'm trying to connect to a MySQL 5 database using the MySQL ODBC 5.1 driver. In the control panel's ODBC settings I created and tested the ODBC connection and it's working fine. When I try to use the connection from VBScript code I get an error though: ADODB.Connection error '800a0ea9' Provider is not specified and there is no desig...

Regular Expression Negative Lookbehind Alternative for VBScript

Since VBScript doesn't support lookbehinds, I'm looking for an alternative solution. I have the string '\E\F\'. I want to replace \F\ with '~', but ONLY if it is not preceded by a \E. After the substitution, I want '\E\F\' to be '\E\F\'. If the string was 'randomText\F\', I would want it to look like 'randomText~' after the substi...

where does msscript.ocx gets installed from

Hi All, I'm using msscript.ocx in my application which is an activex scripting host for windows. Although I want to be able to use the same for XP embedded(XPe) which's highly customizable. 1.I want to know whether on XPe, msscript.ocx can be optionally installed or not? 2.Where does it get installed from, IE? 3.Or is it a windows co...

problem with get data from MSScriptControl

Hi to all! I have problem with get data from vbscript in C# console application. I just write below code: int[] i = new int[3] { 1, 2, 3 }; string msg = ""; object[] myParam = { msg , i}; MSScriptControl.ScriptControlClass sc = new MSScriptControl.ScriptControlClass(); sc.Language = "...

Compare two values

Hi All, I want to compare two values which is coming as string input. please help me how to compare this values strA = "25.03" strB = "-25.02" Raja ...

Request.Form for a textarea returns bad data

This is a very weird error ocurring only with Firefox 3.5. I have tested it for IE, Safari and Chrome revealing no errors. I'm using my localhost IIS 5.1 and ye old asp. I've been able to reduce the scope to this... I have a textarea in a form, filled with 4000 characters, for example. < textarea name="obs" id="obs" cols="75" rows="1...

What is &H14& in VBScript?

I found the following article : here about installing fonts on a Windows computer via a script. The author uses VBScript to do that, but I'd like to use Ruby/Python. There is a line in the script I don't understand : Const FONTS = &H14& What is that &H14&? Is it a number? How would I represent that in another language? ...

Connect to mysql 5.0 database using pure vbscript?

I've tried the below script but I am getting an error: dim cn, rs set cn = CreateObject("ADODB.Connection") set rs = CreateObject("ADODB.Recordset") cn.connectionstring = "Provider=MysqlProv; Data Source=Adonis; User Id=mysqluser; Password = mysqlpass;" cn.open rs.open "select * from Countries", cn, 3 rs.MoveFirst while not rs.eof ...

Issue with traversing through XML data - the VBScript way.

Sample XML: <cart subTotal="USD 3.50" > <item productSubTotal="3.50" > <pkProductItem>241</pkProductItem> <itemCode>23455-green-XL</itemCode> <itemName>my product ( green - XL-size )</itemName> <qty>1</qty> <itemUnitPrice>3.50</itemUnitPrice> <totalItemPrice>3.50</totalItemPrice> ...

Export Excel workbook with many worksheets to XML or CSV

Hi, I have a project to upload the data in many excel workbooks, each containing many worksheets that all have different columns. Fortunately all the workbooks are in the same format. Is there a programmatic way to loop through these worksheets to export it into one flat file in XML or CSV? I have experimented with ETL tools, but all o...

VBScript how to set the connection string

I am not sure whether it has been disscussed before or not but I have the following code (I changed from example for an Access database.) I don't know what to put inside the 'Provider' and the 'Data Source'. I'm using MS SQL Server 2005 and how to find this information in my machine? Please, even I try to follow from here http://www.c...

VBSCRIPT arrays keys

Hello I'm fairly new to vbscript and I'm struggling a little as I'm more familiar with Javascript. Can someone please give me a hand? Does vbscript allow the use of named array keys like I have in my example below? For example I have: Dim result(3) result(age) = 60 result(firstname) = "Tony" result(height) = 187 result(w...