vbscript

VBScript ending process started by .bat file

I have a scenario setup where I need to test to see if the results of a .bat file execution returned results. The .bat file calls up another .exe and the .bat file has a CMD DOS window that outputs critical error info to that DOS box from the .exe. If the .exe does not start correctly, I am able to check the results in our SQL DB. I need...

How do I find start and end rows of merged cells in Excel with VBSCript?

From a VBS script I have to work with an Excel book with the format: | A | B | C | ----|-----------|-----------|-----------| 1 | Header1 | Header2 | Header3 | ----|-----------|-----------|-----------| 2 | FOLDER1 | | | ----|-----------|-----------|-----------| 3 | Item1 |...

ASP FPDF, problem with inserting image

Hi there, I have some problem with inserting image when i generate pdf using FPDF library (ASP port version) you can get it here ASP FPDF I have tried this code (this was ASP VBScript): pdf.Image Server.MapPath("map.jpg"), 10, 10, 800, 400 pdf.Image "map.jpg", 10, 10, 800, 400 pdf.Image "http://localhost/pdf_test/map.jpg", 10, 10, 80...

Does VBscript have modules? I need to handle CSV

I have a need to read a CSV file, and the only language I can use is VBscript. I'm currently just opening the file and splitting on commas, and it's working OK because there aren't any quoted commas in fields. But I'm aware this is an incredibly fragile solution. So, is there such a thing as a VBscript module I can use? Somewhere to ge...

cast string to date time in classic asp

I have a string of "DD/MM/YYYY HH:MM:SS" which I need to transform to a date, the problem is the default conversion goes "MM/DD/YYYY HH:MM:SS" unless the day is >12 in which case it switches. I'd like to ensure that my day's go into the day portion of the date/time. Is there an easy fix to this? ...

VBScript 800a005e Error

I'm using old VBScript in my ASP application. Trying to search and replace string using Replace(wholeText, textToSearch, textToReplace) function but i'm getting the following error: Microsoft VBScript runtime error '800a005e' Invalid use of Null: 'Replace' /instance/inst_spam_gen_4.asp, line 25 And here is my function: Function cl...

Where's my URL parameter?

I have a legacy web page made with frames (yah, I know). One frame (letFrame) is trying to update another frame (rightFrame) with the following anchor: <a href="foo.asp?myVar=BAR" target=rightFrame> foo.asp is already loaded in rightFrame and looks something like this <%@ Language=VBScript %> <HTML> <HEAD> <META NAME="MYNAME" Content...

Vista Recycle Bin Maximum Size

Does anyone know how to set the Maximum Size of the Recycle Bin via script? Whether its written in batch or vbs or just a reg file? I've been exploring this idea for the last few days, and can't get an answer. Maybe someone here knows how. I'm wanting to add it to my Vista Cleanup Script =) ...

Hanging VBScript on query.

I inherited a piece of code from a recently-retired colleague that gets the total physical memory on a box and, when I perform the following on Windows XP and Server 2003, it works fine: memSize = 0 set colItems = wmi.execQuery("select * from Win32_LogicalMemoryConfiguration") for objItem in colItems memSize = memSize + objItem.Tota...

Create user account with VBScript

Hi, I'm using this code to create user account, Function CreateUserAccount (acc, paas) Dim WinUserAccountName, WinUserAccountPass WinUserAccountName = Session.Property("WIN_USER_ACCOUNT") WinUserAccountPass = Session.Property("WIN_USER_PASS") strComputer = "." set objSystem = GetObject("WinNT://" & strComputer) set objUser = o...

Modify XP theme (appearance&color scheme) from a vbscript

Does anybody know how to modify Windows XP appearance and color scheme using VBScript? I have an application written in Visual C++ that needs Windows XP appearance (not classic) to be properly displayed and I want to set this properties from the Installation. I use InstallShield to make the installer and VBScript to perform some custom...

Can not find the motor commands

I have a spanish lanugue XPSP2 machine runnning a .vbs logon script that is recieving the following error "No se encuentra el motor de secuencias ds commandos "VBscript" para la secuncia" rough translation is "Can not find the sequence of motor commands ds "VBscript" for secuncia" Does any one have any insight as to what this error m...

Relative date/time for classic ASP

Does anyone have a relative date/time from now to a natural/human for classic ASP function in VBScript? This is like Twitter. Examples: Less than 1 minute ago About 5 minutes ago About an hour ago About 3 hours ago Yesterday Wednesday etc. ...

Get current memory utilisation of a process running on a remote machine with WMI.

I want to write a VB script that will return the current memory utilisation of a process on a remote machine. I'm currently getting the info by greping the output of pslist.exe but that's not ideal. ...

Connecting to OpenLDAP server in vbScript via openDSObject

I have code that works correctly to connect to an Active Directory server: Dim oDSObj: Set oDSObj = GetObject("LDAP:") Dim oAuth: Set oAuth = oDSObj.OpenDSObject("LDAP://ldap.domain.com", "DOMAIN\username", "password", 1) However, I can't seem to figure out the syntax to make this work against an OpenLDAP Server: Dim oDSObj: Set oDSO...

VB script math function

Hi friends, I have an ASP page where I have 2 variables, strActualRate and strProposed. The values are: strActualRate = 33.30 strProposed = 33.3 So when I write the following line to compare: if strActualRate <> strProposed then Response.Writr "Both are not equal!" end if I am getting the output "Both are not equal", even though...

Starting out, any suggestions?

I have started working in C# for almost a few months and I am looking for something more challenging and interesting. I use a media player called media monkey that supports custom vb scripts, well I made one that writes a file to a dir that has the current song playing, and is updated every time a new song is playing by rewriting what wa...

How do I call system code from JScript/VBScript?

I have a C# app that uses a web browser control to display some HTML and do some JScript in the background. How do I integrate this with other system calls? Do I call other C# code from JScript/VBScript? Do I need to do it from the form itself? ...

Application development with Rational ClearQuest

Has anyone had experience with developing web apps using ClearQuest? Looking at the features, it mentions process automation but I'm not sure how large of a process/application it can support. Our group gave up a small section of a larger application to another group that used ClearQuest to web-enabled the process but now the ClearQues...

.WSC won't recognize code changes

I've run into this problem before and the solution has usually been to restart IIS. Basically I've made a number of changes to a .wsc file on our server. But when it runs it doesn't run the new code changes I made. I've verified this with event logging at the beginning of the file and it doesn't show up. My problem is that obviously res...