vbscript

Utilize ADO.NET within Classic ASP script

I'm writing some simple queries which return a single value and I'd like to get the ADO.NET ExecuteScalar method's behavior from Classic ASP's ADO libary. However, I'd prefer to not re-invent the wheel. Is it possible to instantiate ADO.NET's Command object within classic ASP? If so, how would I go about doing that? If I do need to re-i...

data source name not found and no default driver specified. Microsoft OLE DB Provider for ODBC Drivers

Hello, i'm not a windows administrator, so I do not know what I'm doing wrong. I have this script to get vmware esxi3.5 reports, http://paste.ubuntu.com/493213/ I get this error: C:\Documents and Settings\admmarc\Desktop\test\vcreport. DB Provider for ODBC Drivers: [Microsoft][ODBC Driver not found and no default driver specified...

Uninstall a program with PowerShell or VBScript

I tried using this code in this thread: http://stackoverflow.com/questions/113542/how-can-i-uninstall-an-application-using-powershell But it doesn't uninstall the product. I just get this back: __GENUS : 2 __CLASS : __PARAMETERS __SUPERCLASS : __DYNASTY : __PARAMETERS __RELPATH : __PROPERTY_COUNT...

Is it possible to upload a image using the src parameter in PHP?

Hi Friends, I know this question may be wrong one.Anyway I want to know is it possible or not? I am using the VBscript as client side language and PHP as server side language.By using the VBscript I got a image from the scanner and that image is stored in local system.I want to move it to server without client choosing the file. When the...

How to set focus on file dialog opened in Vbscript

Our Team is automating tests/test data preparation in QTP and we do the scripting in VBScript. In several tests the tester who runs the script need to supply an MS-Excel file with the indata. We use UserAccounts.CommonDialog for this and it works great. Except for one litle problem, when we run this from QTP the file dialog does not get...

VBScript seems to be GC'ing objects from nested scopes in the wrong order.

I have the following code: function p (str) Response.Write VBLF & str end function function nop: end function class Test1 private sub class_initialize p "Test1 Start" end sub private sub class_terminate p "Test1 End" end sub end class class Test2 private sub class_initialize p " Tes...

Why is this C# COM class usable from VBScript but not JScript?

Consider the automation-compatible COM library in C#, given below. It follows a common COM pattern of having a visible factory coclass FooFactory implementing ICreateFoos which creates an object of type IFoo. FooFactory is the only coclass in the type library. (The factory pattern is particularly useful with COM, as it does not allow for...

Visual Basic Script simple time elapsed

I want to show message to user when 3 minutes passed in VBS. ...

How do I delete "filename.txt" in "blah\bleurgh\filename.txt" in VBS?

Hi, such a silly question I know, but I want to remove the filename in a string such as "blah\bleurgh\filename.txt" To delete the extension I would do strFile = Left(strFile, InStrRev(strFile, ".") - 1) But doing similiar to delete the filename at the end does nothing, e.g. tempStrFile = Left(tempStrFile, InStrRev(tempStrFile, "\...

Script to install an application and redirect to an internal address.

I want to install a piece of software (MultipleIE: it allows you to installs IE 3.0 - 6) I want to install just IE6 then have the shortcut redirect to an internal site (Http://finance) Is there an easy way to do this with a simple script? (VB, PowerShell, etc.) Our Help Desk is not very helpful, and we have at least 20+ users who need ...

Classic ASP Session Variables Lost on Windows Server 2008 R2 / IIS 7

We transferred our existing website which is running on a Server 2003 machine using iis6 and coded with classic asp to a Server 2008 64 bit machine using iis7 and classic asp. The only changes to the pages were for our calls to a Universe db, which need a new connection string . We tested all the pages within the department running 4-5...

How do I add a custom property to a file using VBScript

When you right click on a file in Windows Explorer and click properties and then click the Custom tab there is a list of properties. I want to add one of these custom properties using a VBScript file. The property's name must be Version and the value must be a version number such as 1.0.0.0. The file type is an msi. ...

What is the order of destruction of objects in VBScript?

In what order are objects in a .vbs destroyed? That is, given these globals: Set x = New Xxx Set y = New Yyy I'm interested in answers to any of the following. For instances of classes implemented in the .VBS, in what order will Class_Terminate be called? Cursory poking suggests in the order (not reverse order!) of creation, but is...

Should I start learning ASP Classic or 'continue' learning ASP.NET?

Some background info: A year ago I had to learn PHP in school, I already knew ActionScript3 so it wasn't that difficult, and together with a friend of mine we were the first 2 of our school to learn ourselves OOP in PHP. It wasn't required but we thought it was important. Last year I started learning C# and ASP.NET, I really like C# btw...

ESRI - Arcmap help to create a button that will populate current date for selected features

I would like to create a custom tool or button in Arcmap that programmatically fills in a number of attributes of selected features for a layer. To keep things simple, lets say my Arcmap project only has one SDE layer, and I'd like to populate the Date_Created field. The SDE layer being edited is versioned. I have some code that partial...

vbscript return string of whole words <=specified limit

I want to, in vbScript (Classic ASP), parse a string to a specified length without cutting words. The final string may be less than the specified length (to avoid cutting words), but should not exceed it.. ...

How to set environment variables in vbs that can be read in calling batch script

I have a batch file that calls a vbscript file. I am trying to have the vbscript file change an environment variable that is later used in the batch file that calls the vbscript file. Here are snippetes from the files. Parent.bat Set Value="Initial Value" cscript Child.vbs ECHO Value = %VALUE% Child.vbs Set wshShell = CreateObject(...

In vbscript, how do I run a batch file or command, with the environment of the current cmd prompt window?

In vbscript, how do I run a batch file or command, in the current cmd prompt window, without starting a new process. For example. According to script56.chm (the vbscript help apparently) Windows Script Host Run Method (Windows Script Host) "Runs a program in a new process" So if I have code that uses that e.g. a VBS file, and a BAT...

Firing a click event using VB Script in wondows forms.

Is it possible to fire a button click event using vbscript The Button is presented in windows form. I thought VB script also same as like Javascript. After the html page has been loaded in IE, we can trigger the button click event using javascript. In the same way is it possible to click an button using vbscript.But the button is presen...

Handling ADODB connections in classic ASP

Hi, I'm an ASP.NET C# guy who has to go back to classic ASP, and need some help with it. First, look at this two functions (I know in VBScript the comments are declared by ' and not by // but the syntax highlighter here messes up with '). First version: Function DoThing Dim Connection, Command, Recordset Set Connection = Ser...