vbscript

Is it possible to use VBScript or JScript to instantiate SharePoint objects?

I want to be able to run VBScript or JScript on a server using cscript.exe to manipulate SharePoint through the object model. For example, to update the log file location: Microsoft.SharePoint.Administration.SPDiagnosticsService serv = new Microsoft.SharePoint.Administration.SPDiagnosticsService(); serv.LogLocation = @"E:\"; serv.Updat...

Windows Scripting: Get Default Options for MS Access

Trying to find the object property for Access to get the default file location so I can script an update to it. Example: this grabs the stuff from Word and tells me where the user file, and template paths point Const wdDocumentsPath = 0 Const wdWorkgroupTemplatesPath = 3 Set objWord = CreateObject("Word.Application") Set objOptions = ob...

Can I pick up environment variables in vbscript WSH script?

Is is possible to read system environment variables in a Windows Scripting Host (WSH) VBS script? (I am writing a VBScript using Windows Scripting Host for task for a Cruise Control and want to pick up the project build URL.) ...

Can I access excel mathematical functions from flex action script through vbscript injection?

We are looking to do display some mathematical data in a Flex GUI chart. We need to do plot for two array of data the following. cross-correlation of both auto-correaltion of each and correlation coefficient It looks like Flex does not support scientific formula like cross-correlation,auto-correlation and co-relation co-efficient nativ...

How to set ie margins with javascript or vbscript or jquery?

I want to get print out invoice but also wanna set margins and page size with javascript or vbscript or anything else. is there any tutorial about that ? and would you share something about ie8 to get print out easly? ...

How to unzip a file in VBScript using internal Windows XP options in

I want to unzip a .zip file using VBScript, only it's always a new computer with no external applications on it. Now I know Windows XP and 2003 have an internal .zip folder option, so I guess I can use it via VBScript in order to extract the file. How do I do it? I tried: Set objShell = CreateObject("Shell.Application") Set SrcFldr =...

Server.MapPath in a COM Component

I'm rewriting an old VBSCript WSC component into a nicer C# COM Component. For a horrid reason the old component in one place is passed the Server Context, IServer by using Set objCurr = CreateObject("MTxAS.AppServer.1") Set objCurrObjCont = objCurr.GetObjectContext() Set component.servercontext = objCurrObjCont("Server") this is th...

vbscript insert into ms access

hi, I am working on a small ap that uses vbscript to write to a ms access db everytime i use it (really for personal use only so i don't need to worry about sql injection). When i run it i keep getting a "syntax error in INSERT INTO statement". The connection string is correct because the db locks when its run. table name is ors. What...

VbScript ASP: checking checkbox

I have a html page with a form that has some check boxes. I need, using VbScript ASP, to make sure that one checkbox is checked. How do I do that? Here's the checkbox itself: Dim terms terms = Request.Form("terms") ...

Is there any way to check to see if a VBScript function is defined?

This is probably just wishful thinking... Is there any way to check to see if an ASP/VBScript function is defined before calling it? ...

How to SQL insert a raw/Binary field value from bytes/integer array using VBScript (orVB6)?

Does anyone know how to pass a several bytes into a Binary (or varbinary) field using SQL and ideally in ADO (classic) & VBScript (or Visual Basic 6)? I wish to encode 10-20 (maybe more) bytes of data and have this data stored in a SQL db field. (Its not MS-SQLSVR, but I'm hoping that a standard SQL supported format will work!) The byt...

How to create options dialog with VbScript?

I have a third party application that invokes a vsbscript file for certain operations. I would like to put up a user prompt with a choice of options, either a drop down list or checkbox or some such. However, all I can find is the input box option. I don't think HTAs are an option in my case (unless there is a way to call them from a ...

PowerDesigner - Assign a TriggerTemplate to a trigger through VBScript?

In PowerDesigner v12, how would one, through use of VBScript, assign a TriggerTemplate to triggers that are missing the definition? We have a script now that can loop through the triggers and display the triggertemplate (if it has one), but all attempts to assign a template to these triggers have failed. Any insight would be greatly ap...

IIS upgrade NOT backwards compatible?

I have a series of web pages that running off if an IIS (5.1) server. The pages use VBscript in .ASP pages which display and populate a back end database. These pages have been working 100% error free for years. I loaded a Microsoft tool (Visual Studio Express) to try it out. After loading the tool the IIS server started producing err...

What is VBScript error code 0x800A01FB

I have a solution based on ASP, VB6, COM and SQL Server. The web server is IIS 6. At irregular intervals, I get the following error message on the ASP page: Microsoft VBScript runtime (0x800A01FB) An exception occurred: 'objPSM.GetValue' (where "objPSM" is my own session-handling COM class). If I reload the page, it works. I tried ...

MSXML2.ServerXMLHTTP.4.0 Source?

Where does the object "MSXML2.ServerXMLHTTP.4.0" come from? Which install package? I'm attempting to do the following: Set oXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.4.0") This attempt fails on my development machine (no object is returned) but it is successful on my collage's development machine. Obviously he has something inst...

reusing Internet Explorer COM Automation Object

I am using VBScript macros to utilize the InternetExplorer.Application COM automation object and I am struggling with reusing an existing instance of this object. From what I have read, I should be able to use the GetObject() method in vbscript to grab a hold of an existing instance of this object. When I execute the following code I g...

VBScript SQL sanitization

Wary of Jeff Atwood's "Bathroom Wall of Code" post, I thought it would be useful to have a trustworthy SQL sanitisation function for VBScript, similar to PHP's mysql_real_escape_string() function. So, how can I properly sanitise data input into a SQL query using VBScript? ...

Calling WCF service by VBScript

Hi, There is a WCF service with configuration: <services> <service name="MyService" behaviorConfiguration="MyServiceBehavior"> <endpoint binding="basicHttpBinding" contract="IMyService" /> <host> <baseAddresses> <add baseAddress="http://localhost:8001/MyService" /> </baseAddresses> </hos...

Script to retrieve friendly names of all drivers in Windows Vista Driverstore

I am seeking a way to enumerate all Drivers in the local Driverstore of the workstation and retrieve the "friendly name" that is the Name that the User sees in for instance the add printer dialog. Specifically i would also like to list only a specific class of devices like Printer. If possible vbscript or jscript via Windows Scripting H...