VBScript (Visual Basic Scripting Edition) is an interpreted scripting language developed by Microsoft that is modeled on Visual Basic.
1
vote
1answer
11 views
Find specific string in a text file with VBS script
I need to find the string "Test Case " & index in a txt file.
I give you an example of the lines you can find in this file:
<tr><td><a href="../../Login/Log_ in_U1A1">Log_ ...
1
vote
0answers
24 views
Getting the full path of an advertised shortcut from outside the MSI
I working on getting the full directory path of the key file of a component, of an advertised shortcut using VBScript, from outside an MSI.
I read we can make use of the MsiGetComponentPath & ...
1
vote
1answer
13 views
VBScript Renaming Windows Computer with Options
You guys did great helping me with one VBScript, so I'm going to throw another your way. Perhaps you can help me iron out the wrinkles.
My intention with this script is to rename the PC. The computer ...
-1
votes
3answers
32 views
Calling vbscript function from html button
Don't be surprised if what I'm doing is completely wrong or if the solution is obvious.
<script type="text/vbscript">
Function AddPrinter()
Set objNetwork = ...
-3
votes
0answers
26 views
Managing FTP with VBS [closed]
I'm trying to use ActiveXperts Network Component for managing FTP, but am getting the following error:
How to upload a file in specific directory of FTP after suitable data are provided?
0
votes
3answers
25 views
Concatenate “changes” output in vbscript
I have a "problem" with a vbscript. I check if a cd is loaded with this piece of code:
On Error Resume Next
Computer = "."
Set OutFile = CreateObject("WScript.Shell")
Const ForAppending = 2
Set ...
1
vote
2answers
25 views
Replace a number in CSV file with VBscript without replacing all text
I'm working on this code
Dim strFirm,soNumber,strValues,arrStr,strCitrix,NewText,text
strFirm = "Gray"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = ...
-1
votes
0answers
13 views
ActiveX Control - Changing Source
First let me say I'm new to VB and its the first time I'm using it.
I've a project in hand that requires me to change an existing ActiveX Control.
The problem is... I changed the source , compiled the ...
0
votes
1answer
27 views
Automating device driver search function
The basic Windows "Update Driver" wizard allows the ability to point at a folder and perform a recursive search for the proper .INF file. Would anyone know what allows this to called with VBS or CMD? ...
0
votes
1answer
13 views
Varying results when trying to handle errors in database login form
I am making a application which will verify a login to a MySQL Server, which is being done with an ADODB.Connection, then open up another HTA if no errors are given. I am trying to achieve this using ...
0
votes
1answer
21 views
Replacing a word in any given file using VBS
I am not hands on in VB Script.
I have a scenario that i have a .ini file which resides in C:\widows\ . I just need to replace Line no 2 with computer name.
Any help will be appreciated.
0
votes
0answers
13 views
using WebEdit .Type property cannot be used
I have a piece of code in using QTP for a webpage
Browser("Sarit_2").Page("Sarit").WebEdit("frm_vendor_address1").Set dtVAdd1
You will observe, I used a 'Set' property. In reality, I wanted to ...
0
votes
2answers
51 views
How to call an asp function when a submit button is clicked?
I'm new to asp. I have a submit button called "search" in a file called results.asp. I just need to run an asp function called "searchRecords" in the same file as the search button when the button ...
0
votes
1answer
39 views
complex Access query in VBScript
I'm new to Access, and have not worked in VB in a while. I'm having a problem working within our database, can someone shed a little light here?
Query and error:
SELECT piname,
SUM(cat1) ...
2
votes
1answer
27 views
Error using VBScript in BGInfo “Variable is undefined: 'WScript'”
I'm an amateur VB scripter. I'm making a script to check to see if one of two files exists, and if so, give a flag that says "Installed". If neither file exists, flag "Not Installed". Here is my ...
2
votes
2answers
57 views
Why is my entire batch script running as a SETLOCAL command?
I don't understand what I'm doing wrong, the output is always the entire script, with an Invalid parameter to setlocal error! This is probably just a silly mistake, but it's making me crazy.
SETLOCAL ...
0
votes
3answers
32 views
Missing value from variable
I'm trying to populate a <select> with <option>'s on a site with Classic ASP/VBScript. The values are read and taken from an SQL Server Database and the code for that looks similar to:
...
1
vote
2answers
36 views
Passing parameters from vbscript to batch file
Hi I am having an issue passing parameters through a vbscript to a batch file.
I am not very good at programming so I am sure I am just missing something stupid.
Anyway I am using the vbscript to ...
0
votes
2answers
22 views
VBS Scripting Error
I apologize in advance for my "newness" to vbs. I am trying to run this script to search for all pst files on my file server. At this point, I am getting this error:
searchpst.vbs(6, 26) Microsfot ...
1
vote
2answers
38 views
How to set a delay in VB Script to let Excel update data
I have an Excel file that automatically loads the data from an external database (via a Data Connection to an Accesss database that is, in turn, linked to a Sharepoint table). I need to automate the ...
0
votes
1answer
23 views
Getting Partial Response with Asynchronous XMLHTTP
How can I asynchronously read XMLHTTP before it’s finished in VBS? The example
below (which has a ”The data necessary to complete this operation is not yet available”
error if sleep times are not ...
0
votes
1answer
27 views
VBS - Counting total files in directory twice
Scripters extraordinaire -
I have this script. It does the job it's supposed to do which is pull the first three characters of a file name and move them to the back of the file name. Surely there ...
0
votes
2answers
18 views
Perl script launched with .vbs - problems with “Program Files” in path env variable
I'm launching a perl build script with a .vbs file, however when the perl window is executed it gives me "Can't find cl.exe, no such file or directory"
Running the perl script directly gives no ...
-4
votes
0answers
22 views
parse data from html table with vbscript
I have a file on my computer, named question.html containing the following code the full path of this file is: C:\Users\esyundyukov\Desktop\Qualification Work\scripts\question.html:
<html>
...
0
votes
1answer
18 views
On Error Resume Next does not catch SQL server error in vbscript
I have a piece of vbscript code that I am runnning in QTP
objRecordSet.Open "select regn_code from region where regn_code ='" & rCode & "'",objConnection
On Error Resume Next
If ...
1
vote
1answer
32 views
rowcount in Forloop does not update when row is deleted
I am trying to run this code in QTP which is for deleting records from a grid. This code
dgRows = SwfWindow("PWC - [PWC]").SwfWindow("Region Master").SwfTable("dgMaster").RowCount
For i = 1 To ...
0
votes
2answers
41 views
How to create a file from Wscript.Echo strLine
Just starting with VBScript:
This script retrieves a file path from a text file and displays the output on the screen:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = ...
0
votes
0answers
17 views
detect vmware version programmatically
I'm wondering if there is a way to detect which version of VMware my machines install to. We're creating a W2K8R2 ISO to deploy across several different machines, some physical and some virtual, and ...
0
votes
1answer
23 views
Easily insert multiple numeric values into a query string
I have a query that pulls multiple results from a proprietary DMS software. The syntax is as follows:
{[Members]:[Acct No]="numerical value 1"} | {[Members]:[Acct No]="numerical value 2"} | ...
This ...
0
votes
2answers
38 views
Changing Drive Letters
I'm having a little trouble figuring out how to use a root directory with a program for flash drives. For example: I'm trying to run "E://Program/data/install.vbs" but the driver letter keeps ...