vbscript

Script - run once to copy and perform silent install

Hi all, Here is what I want to do - I would like to install a software on every PC in my domain. I would like it fully automated. I am sure this can be done either using a batch file or a vbscript. Here is what I would like to do: Check if file exists on local machine based on log file (related to step 4) If not, copy exe from server ...

how does vbscript evaluate string greater than string?

i'm converting some vbscript from an asp app and ran across a line in the form of If sCode > "" Then where I expect sCode to contain a string. i know enough vbscript to plod through it but i'm not sure of the behavior of some quirkier statements. c# will not accept that as a valid condition check. what is an equivalent c# statement? ...

vbscript: how to print multiple files with printer selection dialog once

I have to write vbscript that prints all files in a folder. Printer dialog should popup at the very beginning to allow user to select printer to use. Than all files should be send to printer silently How can I do that? Thank you in advance! ...

vbscript SendKey

Hi, I have a process I need to run which can only be run by shortcut keys which are CTRL+ALT+RIGHT SHIFT To make it easier for users I would like to create a desktop shortcut to click on to run this shortcut. The way I thought this could be done is by vbs script sendkey. Am I right in my research to say that right shift key can not b...

Press Enter Key in qtp

How to perform the Pressing of Enter Action in QTP. I'm selecting a cell and able to set a value , Now i want to press enter key and get the list from that Java Edit box. Which are the different ways i can achieve this? ...

Accessing VB6 Collection Item from VBScript embedded in HTML

Hi, i'm learning by practice. I was given an OCX file which according to who gave it to me was created using VB6 and I have the task of creating a user interface for it to test all the functionality that is described in a poorly written documentation file. On top of that I am not well-versed in VBScript but I've managed to dodge a few bu...

VBScript and numbers larger than Long

Is there a way to work with numbers that are larger than VBScript's Long? Long's range is -2,147,483,648 to 2,147,483,647 and we need to work in an asp page with larger numbers. We cannot work with strings and we need to sum it and do some other calculations. ...

How can I use Windows Portable Device SDK in a VBScript?

Hi, I would like to write a small script using VBScript in Windows 7 through the WSH to communicate with a Portable (MTP) Device. Do you know how I can istantiate the basic objects? Just the initial fwe lines.. Many thanks! This could help you (didn't help me unfortunately) : http://msdn.microsoft.com/en-us/library/dd389295(v=VS.85).asp...

How do I run a parameterized SQL query in classic ASP? And is it secure?

I'm about to have to deal with some SQL code in classic ASP VBScript. I have two questions. First, in .net, I'm used to using the System.Data.SqlClient namespace objects to perform queries. For example: Dim conn as New SqlConnection("Data Source=MyServer;uid=myUid;pwd=myPwd;Initial Catalog=myDataBase;" Dim cmd as New SqlCommand("Se...

get next max problem with A999 > A1000

Some product serial numbers are of type varchar and have a letter indicating the type followed by a number. The numbers are 0 padded up to 5 digits and we are approaching 'A100000'. For the letters that have less than 100000 items they still want 0 padding up to 5 digits, and the letters that have more that 100000 to have more digits u...

How to find the bitness of the System in VBScript

How do i detect the bitness of the OS in VBScript? I tried this approach but it doesn't work; I guess the (x86) is causing some problem which checking for the folder.. Is there any other alternative? progFiles="c:\program files" & "(" & "x86" & ")" set fileSys=CreateObject("Scripting.FileSystemObject") If fileSys.Fol...

Vbscript + Create and compare an array of usernames

Hi, I'm trying to write a script which basically takes an array of lots of users and checks if the logged on user match. If it does, a different routine is run. This is what I have so far: Dim objNetwork Dim Username Set objNetwork = CreateObject("WScript.Network") Username = objNetwork.UserName What I have to do next is to assign ...

sending data to clients from a server in vb

Actually I have created a chat application is it possible to send data to particular client only? ...

How to get an HTA to restart itself?

I have an HTML Application that I am using to build a kiosk environment. At the end of every session (when the user clicks "Logout" or after a timeout) I want the HTA to close itself and restart*. I was wondering how I would go about achieving this programatically with VBScript. The process should go something like this User clicks "l...

Extract a Table from an HTML File with PowerShell or VBS

I have a two part problem that needs fixing. I'll try my best to describe it then break down what I "think" the steps are. I am trying to get a specific table in a webpage and email it to myself. At the moment what I am trying is to use GNU\Win32 wget.exe (I'd rather use PowerShell natively but for some reason I couldn't, perhaps becau...

Can I get vbscript to show a friendly error message?

Hi all, I'm installing a network printers using vbscript and I want to show a friendly error if the queue doesn't exist or the printer server is unavailable, can I do this with VBScript? My code is below. Dim net Set net = CreateObject("WScript.Network") net.AddWindowsPrinterConnection "\\printsrv\HPLaser23" net.SetDefaultPrinter "\\p...

.vbs Help me loop this through a directory

I have written a script that works. What it does now is it looks through a directory to a given file and returns what is on the second row fourth tab (RXC193) and renames the file to that of which it found from a file like this: @Program @RxBIN @RXPCN @RxGroup @MemberID @WebsiteE @WebsiteS @VerticalLogo @TextLogo RXCUT ...

How to convert an image file to BMP programmatically using native Windows XP capabilities?

Is it possible to convert an image file to BMP format using WindowsXP's native libraries and scripting capabilities? I'm talking about WSH, JScript, VBS, etc... C++ is also good for what I need if it can be compiled with Dev-C++ ...

Getting a 400 - bad request when sending an xmlhttp to a wcf using vbscript

we are getting an 400/bad Request when we send a request. Please find our code below. Public Sub test123() URL = "http://dev1.xxxxx.employer/employer/v02/Employer.svc" Dim requestDoc Set requestDoc = CreateObject("MSXML2.DOMDocument.3.0") Dim root Set root = requestDoc.createNode(1, "Envelope", "http://schemas.xmlsoap....

VBScript not executing sql statment properly

Hi Gurus, good nite! I write you this time because a VBScript that one of the application my company uses to retrieve information from an Oracle database does not seem to be working properly. Here are the facts: There's part of the code that does the following: sSql = "SELECT REQ_PAYMODE" & _ " FROM SYSADM.GBPRESTATIEGROEP" & _ ...