vbscript

Create an Excel file using vbscripts

Hi all, How to create an excel file using vbscripts.I had searched the net but just it mentions about opening the existing file using vb scripts. This is the extraction from the Internet shown below Set objExcel = CreateObject("Excel.Application") Set objWorkbook = objExcel.Workbooks.Open("C:\Scripts\New_users.xls") I want to k...

How do you implement a select statement in VBScript?

Can anyone please tell me how to implement select statements in VBScript, similar to switch statement in C? It would be great if you provided some examples as I'm pretty new to VBScript. Thanks. ...

VBS Script: Copy directories listed in web file from Windows machine to Unix/Samba Share

[Outline] Hello Folks. In the home here we have five windows PC's running various editions of XP and Vista. As a backup solution, we have a file server with ample space for backups to be made too. Some of the users are not very competent at remembering to back their files up. I'd like to run a script on shutdown of a machine to fetch a ...

VBScript to connect to SQL Server 2005 and update a table

I am new to VBScript. Can someone please help me to connect to SQL Server 2005 (OLEDB) using VBScript and update a table in the database. My server: sql14\qw My database: fret User id: admin Pasword: pass Table name: lookup ...

Uninstalling Excel add-in using VBScript

I'm trying to create a MSI installer that installs an Add-In (.xla) into Microsoft Excel (2007 in my case). Installing it goes well. I use a 'Custom Action' that runs this VBScript file: Dim SourceDir Dim objExcel Dim objAddin SourceDir = Session.Property("CustomActionData") Set objExcel = CreateObject("Excel.Application") objExcel.Wor...

Disable Internet Explorer shortcut keys

EDIT: After waited a while and didn't get anything yet, I've decided to do shortcut disable thingy only for IE now. Is there a possibility to disable IE shortcut keys to access menus/print etc. via vbscript? Is it possible to disable browser shortkeys? Because many of them are using in application. For instance, "ctrl+p" i...

Encoding issue: vbscript "Chr()" to .Net C#

I can't seem to find the answer to this question. It seems like I should be able to go from a number to a character in C# by simply doing something along the lines of (char)MyInt to duplicate the behaviour of vb's Chr() function; however, this is not the case: In VB Script w/ an asp page, if my code says this: Response.Write(Chr(139...

Get each character in a string using vbscripts

Hi all, Is there any way by which we can get each character from a string using vbscripts.I had used the Mid function but i just wann know if there are any direct functions which when used returns each character starting from a string. Thanks Maddy ...

ASP VBSCRIPT variable declaration issue

First of all, I got a question in .asp page Class clsTesting Function hash_call ( methodName,nvpStr ) ..... Set SESSION("nvpReqArray")= deformatNVP( nvpStrComplete ) ..... End Function end class When I perform call to this function, once reach the Set SESSION("nv line it say error: Microsoft VBScript runtime (0x800A01A8) Object ...

VBScript: Finding the number of elements in an array

What is the "best" way to determine the number of elements in an array in VBScript? UBound() tells you how many slots have been allocated for the array, but not how many are filled--depending on the situation, those may or may not be the same numbers. ...

Read and write into a file using VBScript

How can we read and write some string into a text file using VBScript? I mean I have a text file which is already present so when I use this code below:- Set fso = CreateObject("Scripting.FileSystemObject" ) Set file = fso.OpenTextFile("C:\New\maddy.txt",1,1) This opens the file only for reading but I am unable to write a...

VBScript, purpose of colon?

What is the purpose of the colon? e. g.: Dim objConn : Set objConn = OpenConnection()` Is the colon used to combine the two statements into one line? I just want to be sure. P.S.: I tried searching the answer to this question on Google with no luck. ...

How to debug "Wrong number of arguments or invalid property assignment" vbscript .NET interop

I have a .NET assembly, written in C#. It's marked ComVisible, has a guid, is signed, regasm'd (/codebase). I did not formally define an interface for the COM part. I use this assembly via VBscript. There's an overloaded method - one form takes a single string argument, and the second takes two strings. Both return another .NET type...

ASP Option Explicit - Paypal Express Checkout trouble

Hi guys, I am facing a big trouble when integrating PayPal Express Checkout in classic ASP. The code provided by PayPal at the "PayPal Integration Wizard" works perfectly when run without Option Explicit. When I put into my coding pages and call to the functions provided, I am facing big trouble: My existing pages all use Option Explic...

Test complete tool and vb scripts

Hi, I had just started the work on some automated testing tools namely test complete which i would be using alomng with test partner.So i had also started learning vbscripts for this.I just want to know if anyone could provide me any link so that i could learn this tool as well as vbscripting more effectively. Thanks Maddy ...

Creating a text file using VBScript

I know how to create a text file using VBScript which is shown below: Dim a As New FileSystemObject Set Text = a.CreateTextFile("C:\Folder\test.txt") Now I want some script so that my this test.txt file just opens in front of my monitor. Because I know that when we make an Excel file, we just use Set objExcel = CreateObject("Excel.Ap...

VBScript: Passing a parameter with a null value to a stored procedure?

In VBScript (ASP environment), is it possible to pass a parameter with a null value to a stored procedure? ...

Is there a way to do non-blocking IO in VBS or a way to signal it witout a COM event?

I have a variation of a script that comes with Windows Media Encoder. I launch it via WSH and set up pipes to it's STDIN, STDOUT, and STDERR. The script starts encoding and eventually waits in a DO loop checking the encoding object's status so the script knows to exit if encoding stops. (internally the loop just prints a period, and sle...

VBScript Type Mismatch

I have a type mismatch in my VBScript script. I know that the value is correct, but not sure why it's coming up. This is the line where the script terminates: WScript.Echo "DNS Server Search Order: " & objNicItem.DNSServerSearchOrder The script requires a file named servers.txt (which has a list of servers in it, I am tesing using my...

How do I convert an HTML page to a PDF using Classic ASP VBScript?

There seems to be a lot of paid components out there and stuff for .Net, but are there any free ways to convert an HTML page into PDF using Classic ASP VBScript? There has to be something from Adobe maybe? ...