vbscript

How can I copy an image from the clipboard to Microsoft Word through VBScript?

I am trying to copy an image from the clipboard to Microsoft Word using VBScript. How can I do this? ...

How to call C# DLL function from VBScript

I have my script on server, so I have not UI interaction available and have to use DLL instead of console application. How to call a function in C# DLL from VBScript? Have I make my DLL to be COMVisible? Have I to register it? ...

How to make a parametrized SQL Query on Classic ASP?

Can someone show me the simplest way of perform a parametrized SQL query using Classic ASP in VBscript? A compilable example would be best. ...

QTP/VBScript: How to remove all URLs from a string?

I have a string in my QTP test project. In some cases, this string is a plaintext E-mail's content; in other cases it's HTML. In both cases, I need to strip all URLs from the string to match it against an Expected case. How can this be done in QTP/VBScript? ...

Why does this VBScript give me an error?

I saved this VBScript script to my local machine as c:\test.vbs: WScript.StdOut.WriteLine "This is a test" When I run it from the command line, I get this error: --------------------------- Windows Script Host --------------------------- Script: C:\test.vbs Line: 1 Char: 1 Error: The handle is invalid. Code: 80070006 Source: ...

Handling hashed passwords stored as varbinary in SQL Server and classic ASP

All, Sorry in advance - I'm a novice in most of the topics below (SQL, ASP). Anyway... I've got a pretty simple web app that requires users to log in with a user name and password. The front end creates a salted SHA1 hash of the password, and posts it (along with the user's name) to an ASP page. That ASP page takes the data, calls a...

Simplest way of localizing InstallShield Registry keys

Which is the simplest way to localize the registry keys based on the selected language of an InstallShield setup? I am thinking about writing an VBS which sets some properties based on the selected language. These properties could be used from within the registry key dialog of InstallShield. But isn't there a simpler way? ...

Scalability issues when we are calling web services written in .NET using asp/vbscript

We are currently calling web services on our application server through our web server using asp/vbscript. This works very well during low load. However during high load it can sometimes take up to 25 seconds to execute a query like below: Public Function GetValidLogon(storeKey, username) Dim req Set req = CreateObject("Microsoft.XMLH...

What is the difference between CreateObject and Wscript.CreateObject ?

Does anyone know the reasoning behind having the option using: Wscript.CreateObject("some.object") and CreateObject("some.object") within VBScript? when I find documentation or examples that use Wscript.CreateObject, I usually rewrite using CreateObject, because it always seems to work, and then I can easily reuse the code within a...

No clue.. Overflow, Microsoft VBScript runtime error '800a0006'

I'm receiving suddenly this error on a Win2003 Server Web Application: Microsoft VBScript runtime error '800a0006' Overflow: 'Appname' A bunch of updates where performed on this server but I have rolled them back all. The page is old ASP code and if i run file monitor utility it will show the BUFFER OVERFLOW when it hits a GIF. Any...

Retrieving cached data from existing Crystal Reports file

Is there any way to retrieve the cached data from a previously refreshed report and say, dump it to a file? Basically, I'm looking for the dataset that is being used by the report, and hand-dragging each field onto the canvas or even exporting the file doesn't quite get me where I want. I'm not particular to a specific solution, be i...

How to make the columns in VBscript fixed

Hi, I'm a beginner in VBscript and I got a script which obtains disk space usage of local drives. However, when some columns would contain long numeric value, some adjacent columns and even values are moving to the right and thus makes the output disorganized. I already Please see below the contents of the script: Option Explicit con...

Duration vbscript (vbs) function

Is there a function to convert a specified number of seconds into a week/day/hour/minute/second time format in vbscript? eg: 969234 seconds = 1wk 4days 5hrs 13mins 54secs ...

trouble importing csv files to mysql from vbs and access

I am using the following code, based on from previous posts and answers by Remou and Anthony Jones. Dim db: db = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\baywotch.db5" Dim exportDir: exportDir = "C:\Dokumente und Einstellungen\hom\Desktop" Dim exportFile: exportFile=NewFileName(exportDir) Dim cn: Set cn = Create...

Using a reference parameter on ActiveX via Javascript

I have an ActiveX (3rd party, no source) with a method that has a reference parameter like this: HRESULT GetSomething( [in] short param1, [out] BSTR* someString); In C++ you'd execute it like this: BSTR someString = NULL m_activeX.GetSomething(0, &someString); How would I execute this via Javascript? All other functions in the Act...

vbs combining consts

Hi, This is a quick (and probably stupid) question but if I have two consts string how can I build the next const from the previous const i.e. Const PATH_SRC = "some path\" Const PATH_SRC_FILES = PATH_SRC & "files\" I know you may say a const is a const but looking for a quick solution. This is being performed in a vbs script. Than...

Word - Insert data from registry into predefined bookmarks

Hi! I've got data in the registry under Current User which I want to add into predefined bookmarks in Word documents. Now, the thing is, I want the exact same macro in every single Word document and have the macro skip the step if it can't find the predefined bookmark. I've got this code already where I need to predefine an array of th...

VBScript For Each isn't working

I can't get the following function in VBScript to work. I am trying to get all of the files in a folder and loop through them to get the highest numbered file. (file name format is log_XXX.txt) The problem that I am having is that the code never enters my For Each loop. I am new to VBScript, but I don't seem to understand why this won't ...

How can I install a printer driver from an inf, then set up a printer using said driver in vbscript

I'm working on a script that needs to set up a Xerox Phaser printer using the postscript driver. The computers currently have the PCL driver on them (though the printers aren't set up on them yet.) I want to install the PS driver using the specified INF, and then install the printer using the driver provided after the INF is installed (s...

insert date and time stamp, vbs

I'd like to insert the time and date of when the script was executed. So far I just have the username of the person who executed the script.... Set FSO = wscript.CreateObject("Scripting.FileSystemObject") Set NewTextFile = FSO.OpenTextFile("UserInfo.flag",2,true) Set WshNetwork = WScript.CreateObject("WScript.Network") WScript.Echo "Us...