vbscript

Redirect response output with VBScript in ASP classic

In a plain .asp file, any content outside of <% %> tags is sent directly to the output buffer. Additionally, an expression in <%= %> tags is evaluated and sent to the output buffer. I want to redirect it so that, in some context that I establish, the result of those two constructs is instead sent to a buffer that I control. If possible,...

MS access mdb file has a "repair" status first time it is opened from Access 2007

Hi, I have created an .mdb file programatically from another .mdb file using VBScript. It creates a table in the second .mdb file and populates data. Everything works fine and data is populated correctly. This is done using JET 4.0 driver. The issue is that when I try to open the .mdb file using Access 2007, it tries to repair the fil...

Using a webservice with vbscript - "An operations error occurred."

I've been fiddling a bit with c# webservices and vbscript. Things work fine if I trigger the services manually through IE directly on the webserver, but when I try to run the same service from a vbscript it throws a "An operations error occurred." exception. The service is pretty simple, all it does is create a computer object in Active...

Script to change email addresses of outlook contacts

Exchange 2007 environment. Every mailbox has their own local copy of contacts. I just changed our domain in order to shorten it, and instead of having users go in and change each one of their local contacts, I'd like to write a script that iterates through each of their local contacts, and if the email address ends with '@oldemailaddres...

VBScript to search two Strings in a TXT

Hello, i try to make a VBScript that read a txt and search for two strings and gives out only the last results. String 1: Hello123 String 2: Test123 The TXT looks like this: 27.07.2010 09:45 ... DumDumDum ... 27.07.2010 09:45 ... BlaBlaBla ... 27.07.2010 09:45 ... Hello123 ... 27.07.2010 09:45 ... BlaBlaBla ... 27.07.2010 09:45 ...

How do you pass a javascript variable as an argument to a vbscript function (in the context of HTAs)?

I am writing an HTA and I need to pass a variable that I have in Javascript to a VBScript function. Can you please let me know how to do this? Here is a (nonworking) example of what I'm trying to do: <!DOCTYPE ... > <html> <head> <HTA:APPLICATION ID="chrome" APPLICATIONNAME="kiosk" ... /> ... <script type="text/javascrip...

How do I make MODI not identify rotated images?

I have a VBScript script that looks like this: Const ForAppending = 8 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile("C:\OCRresults.txt", ForAppending, True) set miDoc=CreateObject("MODI.Document") miDoc.Create ("C:\PathToTifScreenshot.tif") miDoc.Images(0).OCR set miLayout = miDoc.Images(0...

Help needed with a script to copy photos from an iPhone / camera that does not mount with a drive letter

I would like to copy all photos from an iPhone to a computer. The iPhone does not mount with a drive letter. Can you have a look at this script, I only have a basic understanding of VB and cannot get it to work. See Urek's post here: http://social.technet.microsoft.com/Forums/en-US/ITCG/thread/67ee3a21-23a6-4f79-8381-50a7580ebf0a ...

How do you display a confirmation dialog before printing from any application?

Hi Guys I'm currently trying to set up a kiosk environment in our reception area and one of the requirements is that when a user tries to print from any application, they receive a confirmation dialog box which lets them know what the cost to print will be along with the option to continue or cancel the job. It would be nice if there w...

How to programmatically edit all hyperlinks in a Word document?

Is there a macro, VBA code or VBScript that I can write to edit the urls of all the hyperlinks in my Word document? Either Word 97-2003 or docx format. ...

vbscript time zones and Daylight Savings

I'm looking for an easy way to get UTC times and date/time information in vbscript, even while specifying a time zone. I need to be able to get the current time in a time zone of my choice. I have seen postings on the web for functions that determine DST, but I'd rather not use something I'd have to update if DST or time zones switched...

In QTP, is it possible to have an anti-description?

What I have is a table of dollar amounts, some of which are links. Example: $0.00 $1,000.00 $1.00 How do I say this most succinctly in QTP-land? Set desCurrencyString = Description.Create desCurrencyString("micclass").value = NOT "Link" I suppose I could just use a boolean value to see where the link is and somehow capture the ot...

How to create a object of java class in excel vba

Hi i have a java class..i have registered in my system(it has shown the message as registed successfully)..but when i try to create an object(the code is as below) It is throwing error as module not found..do i have set the path.if yes how.. Dim conn set conn = createObject("Main") Main is the java class which is in C:\windows\java\t...

Scripting.FileSystemObject and ..lnk file

I'm looping in a folder to get all files inside it Scripting.FileSystemObject doesn't seem to see that a file named ..lnk exist is there a way to fix that? thanks ...

Can you work with char's in VBScript?

I have a .NET Class that contains a property that returns a char value. I am accessing this assembly using a VBScript via COM. When i attempt to read the property that is of type (char) I get an error in my VBScript that reads Variable uses an Automation type not supported in VBScript. How can I get around this error. Is there a way to d...

how to script enumerating windows 2k3 "Blocked files"

Is this possible to list files that are currently blocked? ...

VBScript -MapNetworkDrive lost after restart

Hi -I have this script to automatically map network drives: On Error Resume Next Set objNetwork = CreateObject("WScript.Network") objNetwork.MapNetworkDrive "M:" , "\\devel\fs" After I restart the computer, I lose the mappings. How can I fix it? Thank you very much. ...

How can I query remembered UNC connections similar to "net use"?

I understand how to retrieve the UNC path for a mapped drive from the registry (HKEY_CURRENT_USER\Network), but I also have a need to retrieve remote connections to network resources that were not mapped. For example, opening the 'Run' dialog and typing <\server0123\share$>. If I type "net use", I would see this mapping, but I have bee...

How to control WCF Session from a VBScript client

I have a scenario in which I have to call a WCF Service from VBScript (yes I know this is sad!) Now I know that when you instantiate a proxy to the service in .Net code, that first call may take 10 to 20 seconds longer as WCF bootstraps the channel between the proxy and the service. Once that is done, all calls through that same proxy a...

SQL String query

hey all i have this insert query im tryin to do but it isn't working. no matter how many variations, and variations of variations i try, it always has a problem with my code. Set rstSimple = cnnSimple.Execute("insert into SALT (Email, Username, FirstName, LastName, ActivationCode, TransactionID, ClientID) VALUES (<%=Request.QueryString...