vbscript

Security implications of Request.ServerVariables("REMOTE_ADDR") vs Request.ServerVariables("HTTP_X_FORWARDED_FOR")

Let's say we're tracking the end-user IP for a web service: ip = Request.ServerVariables("HTTP_X_FORWARDED_FOR") If ip = "" Then ip = Request.ServerVariables("REMOTE_ADDR") End If I've read that this is the best method of retrieving end-user IP because it works even for users on a transparent proxy. If we're using the end-user IP...

DotNet version of Windows Scripting Host

Good morning, I work in a small shop (only two of us) and we currently manage more .vbs scripts that we would like to (we would like to manage zero). One of the nice things about these scripts is that it's quick to make changes (as necessary) and go back to our day jobs. That's all nice and good until we decide that the job needs to...

Draw graphs in VBscript

I have a HTML application, partially HTML, partially VBscript, disguised as a form. What it does is it opens a few local files, runs a DOS box containing GAWK and presents a text file as its result. I wish to expand upon it by letting it create a bitmap image with the results in a stacked bar graph, for instance as a .BMP file. But I'm s...

retrive unicode using asp from sqlserver 2005

I'm using the following code to retrieve a message from the database and then write it out to a html page: Dim strDSN, cnn, cmd strDSN = "Driver={SQL Server};" & "Server=(local)\sql2k5;" & ... set cnn = Server.CreateObject("ADODB.Connection") cnn.ConnectionString = strDSN cnn.CursorLocation = adUseClient cnn.Open set cmd = Server.Creat...

How can I abort an InstallShield Setup depending on a vbscript custom action result?

I created a vbscript custom action which checks for some registry keys and alters them if neccessary. In case a key could not be written or something like that, the setup should be aborted. In order to achieve this, I set a property which I tried to use as a condition for the next step within the execute sequence but this does not work....

What is the C++ equivalent to GetObject in JavaScript and VBScript?

What is the C++ equivalent to GetObject in JavaScript and VBScript? The closest match I found to my question is: http://codewiz51.blogspot.com/2008/06/vb-script-getobject-c-api-cogetobject.html However the sample use an unexisting interface and asking for the IUnknown returns null. Did someone have an example that works? ...

Generating an XML file from a script

I've recently have a reason to include into our build script the creation of an XML configuration file. The most straightforward way I can think of to do this is to hard-code the XML content as a string into the script and then to simply create a file and write that XML string to the file (named appropriately etc). Is there a more elegan...

exporting a tab delimited file from an access database

Hello, This code db = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\baywotch.db5" TextExportFile = "C:\Dokumente und Einstellungen\hom\Anwendungsdaten\BayWotch4\Neuer Ordner\Exp.txt" Set cn = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") cn.Open _ "Provider = Microsoft.Jet.O...

Controlling Processes/Apps via Classic ASP script

I want to provide users of a VB ASP Classic website (a well-defined group) with a button which will stop and restart an application running in a visible window on a particular user's desktop on the webserver. The users do not have direct access to the machine (either physically or via vnc, rdp, etc), and this application needs to be ru...

Can I create a child process using WMI VB scripting?

Using WMI VB scripting, I would like to create/attach multiple child processes to a parent process, such as the explorer process. Any ideas how this can be done? Below is my code that fails. Thanks! Chris Option Explicit dim wmi, rootProcessName, rootProcess, objStartup, objConfig, objProcess, strComputer, dropbox, itunes, skype strC...

Accessing Windows (XP) performance counters preferably in VBScript

I'm testing a web application for browser memory leaks using Quick Test Professional (QTP) 9.5 and Internet Explorer 6. PerfMon works for monitoring the memory usage over time, but its data has to be synchronized to the testing results to find out which steps trigger the browser memory leak. Since QTP's scripting language is VBScript,...

How do you access a custom .net dll in vbscript?

I wrote a dll in .NET and I want to access it in vbscript. I don't want to add it to the assembly directory. Is there a way to point too the dll and create an instance of it? ...

Download a file using Javascript

There's this Excel file I want users to be able to download from my server. There must be an easy way to initiate the download of the file after a click on the "Download" button... but I have no clue how to make that happen. I have this so far: (VBscript and ASP) <head> <script type="text/javascript" src="overzicht.js"></script> </hea...

How to escape slash (/) in VBScript?

How do you escape the forward slash character (/) in VBScript? For example, in the following string: bob = "VU administration/front desk" ...

Numeric "date" in database - How to interact with that using "normal" dates?

I'm using this database where the date colomn is a numeric value instead of a Date value. Yes, I know I can change that with a mouseclick, but all the applications using that database were made by one of my predecessors (and everyone after him just ignored it and built on). So if I'd change it to Date a lot af applications would fail. ...

Classic ASP Error Catching - Can it be done directly using an ASP.Net page?

Is it possible to catch ASP errors in ASP.Net (setup custom error pages in IIS) and somehow gain access to the Err oject or something similar like you would using server.GetLastError() in VBScript? Thanks. ...

Visualisation Scripts for Twisted Pixel

Twisted Pixel is easily the best visualisation plug-in I have come across for media players. It accepts scripts written in .milk and .vbs, among others. I can understand .vbs, but I have no clue how to code a proper, reactive visualisation. How do I do this? ...

Javascript error... I think

I've been trying to fix this for two hours straight and I can't figure it out. onclick = "location='exceltest.asp?vanjaar=<%=vanjaar%>&vanmaand=<%=vanmaand%>&vandag=<%=vandag%>&totjaar=<%=totjaar%>&totmaand=<%=totmaand%>&totdag=<%=totdag%>'" That line of code is in an < input type="button" /> attribute. The button links to a page wher...

Is there any free/opensource vbscript to exe converter?

I need to convert a wmi vbscript to exe (to automate configuration in several computers). Any free vbscript to exe utility or any other suggestions? ...

Regular Expressions in VbScript?

Does VbScript have a native implementation for Regex? I need to validate e-mail addresses on an old ASP application. Any pointers would be great. ...