vbscript

MS Excel automation without macros in the generated reports. Any thoughts?

Hello! I know that the web is full of questions like this one, but I still haven't been able to apply the answers I can find to my situation. I realize there is VBA, but I always disliked having the program/macro living inside the Excel file, with the resulting bloat, security warnings, etc. I'm thinking along the lines of a VBScript th...

IE browser script to determine which (if any) ActiveX control will handle specific mime type

I'm trying to figure out in an IE script (javascript or vbscript) which ActiveX control will handle a specific mime type, "image/tiff" in this case. This is easy to do in other browsers that use plugins with; navigator.mimeTypes["image/tiff"].enabledPlugin.name which would return something like QuickTime Plug-in X.X.X I've fo...

How do I run visual basic script from visual basic?

The script is used to enable or disable LAN. I would like to run it from a VB application by integrating it. Could someone help please? ...

What's the vbs code to schedule a task every time Windows starts up?

I would like to know how to write up the vbs code to schedule a windows task to start a .exe program every time the Windows starts up. I found the following code online: strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set objNewJob = objWMIService....

vbscript: Dictionary Object "The key is already associated with an element of this collection"

I'm attempting to write a function to create a dictionary object such that the order of a given column in a given array will link to a key value in another dictionary that provides a locational value within another array (but that last part is outside of the scope) Per the below code, I'm unclear as to why I would be receiving the error...

Is there a way to advance through a for loop by a value instead of one by one in VBScript?

I have a one dimensional array in VBScript that I would like to run through but have the ability to advance by 2,3,4 etc. on each iteration of the loop. In C this would be trivial as... for (int i = 0; i < 10; i+= 2) ...

Script for run script

Hello everybody I have a script on vbscript Dim WSHShell, WinDir, Value, wshProcEnv, fso, Spath Set WSHShell = CreateObject("WScript.Shell") Dim objFSO, objFileCopy Dim strFilePath, strDestination Const OverwriteExisting = True Set objFSO = CreateObject("Scripting.FileSystemObject") Set windir = objFSO.get...

Vbscript - Object Required for DateLastModified

I don't really know what's wrong right here. I'm trying to create a vbscript that basically checks two Folders for their files and compare the DateLastModified attribute of each and then copies the source files to the destination folder if the DateLastModified of the source file is newer than the existing one. I have this code: Dim s...

"Could not load file or assembly" error on trying to access auxillary assemblies from COM

We have the project structure as follows: COMExposedCCW.dll -refers-> BusinessLayer.dll -refers-> Utils.dll COMExposedCCW.dll -refers-> Utils.dll The COMExposedCCW.dll has been registered for COM interop. From the COM application we can successfully create the CCW object and access its properties, but when we try to invoke methods th...

Is there a way to get Visual Studio to provide intellisense for late-bound objects in classic ASP?

I'm working on a Classic ASP (with VB Script) project where I'm instantiating an object from an ActiveX control like so: Dim objHelper Set objHelper = Server.CreateObject("HelperLib.HelperObj") Visual Studio 2005 provides intellisense for the first "layer" of properties and methods, but it can't seem to see properties and methods that...

Problem running VBScript from my UIAccess VB app using MSScriptControl

I'm trying to run some VBSCRIPT from within my application. This works fine when I run my program from within VB. But once I add "UIAccess=true" to my manifest and digitally sign my exe with my certificate, I am unable to run the code any more. It gives errors when I try to interface with any program saying "429: ActiveX component can't ...

Vbscript - Checking each subfolder for files and copy files

I'm trying to get this script to work. It's basically supposed to mirror two sets of folders and make sure they are exactly the same. If a folder is missing, the folder and it's content should be copied. Then the script should compare the DateModified attribute and only copy the files if the source file is newer than the destination f...

How to create multi-dimensional jagged arrays in VbScript ?

I need to create multi-dimensional array of strings. Each row of the array can have varying number of strings. Something like the follwing code: twoDimension = Array(Array()) ReDim Preserve twoDimension(3) For i = 0 to 2 If i = 1 Then twoDimension(i) = Array(1,2,3) End If If i = 2Then twoDimension(i) = Array(1,...

How to create collection object in vbscript?

what should be the parameter for create object the following code dim a set a=CreateObject("Collection") //getting a runtime error saying ActiveX //component can't create object: 'Collection a.add(CreateObject("Collection")) a.Items(0).Add(1) MsgBox(a.Items(0).count) MsgBox(a.Items(0).Item(0)) ...

summer training

hi i wanna make a retail store software for my family retail store .... can anyone help me out with which language to use and just give me some basic ideas I'm an engineering student and have good knowledge of ASP, HTML, CSS, VBSCRIPT and have gone through java , c ,c++. please help me anyone ...

Robocopy - Compare modified dates of files?

Hi, I've been trying to create this script that basically mirrors two sets of folders and it's content (including subfolders), but only copy files that are newer than the ones that already exist. I tried doing this by writing a vbscript, but it turns out that I manualle need to scan each subfolder and then it's content. And then that sub...

Calling WCF service with parameters from VBScript

http://stackoverflow.com/questions/944975 I'm trying to use the code from the above stack article, but my WCF service method requires parameters: SaveCheckData int,int,string,string I've tried frigging with the code to incorporate this, but to be honest, I may as well be trying to perform heart surgery. Can anyone shed any light on h...

What's wrong with this regex (VBScript/Javascript flavor)

I'm trying to run a regular expression in VBA code that uses Microsoft VBScript Regular Expressions 5.5 (should be the same as JavaScript regex) regex: ^[0-9A-Z]?[0-9A-Z]{3}[A-Z]?([0-9A-Z]{6})-?([0-9])?$ input: X123A1234567 match: 123456 The six characters I'm interested in give a good match of 123456, ignoring the last (check) digit. ...

Vbscript - Creating a script that mirrors several sets of folders

Ok, this is my problem. I'm doing a logonscript that basically copies Microsoft Word templates from a serverpath on to a local path of each computer. This is done using a check for group membership. If MemberOf(ObjGroupDict, "g_group1") Then oShell.Run "%comspec% /c %LOGONSERVER%\SYSVOL\mydomain.com\scripts\ROBOCOPY \\server\Templa...

Is there a way to traverse all elements on an html web page by VBScript?

Is there a way to traverse all elements on an html web page by VBScript? For example, I want to get all the object information on an html web page: http://www.echoecho.com/html.htm Here is the script I have created, thanks: Dim objIE Dim IEObject Dim Info Info = “” Set objIE = CreateObject("InternetExplorer.Application") objIE.Visibl...