vbscript

Modifying script with Recursive queries

Good morning all, I need help to add the following additions to a script. 1) Recursive queries (e.g if a group is contained in a group it doesn’t go into that and retrieve all the members) 2) Instead of looking for the AllowLogon right look for memberOf the Terminal Services group The goal is to show all the active acco...

compare 2 files and copy source if different from destination - vbscript ?

Hi, I'm working on Windows XP and I need to make a script that would compare 2 files (1 on a server and 1 on a client).Basically, I need my script to check if the file from the client is different from the server version and replace the client version if it finds a difference (in the file itself, not only the modification date). Could yo...

Reuse existing AutoCAD instance with vbscript

I am using the following vbscript to automate AutoCAD Dim acadObj WScript.Timeout = 30000' set acadObj = GetObject(,"Autocad.Application")' If Err.Number <> 0 Then Set acadObj = CreateObject("Autocad.Application") aCadObj.Documents.Item(0).Close(false) End If acadObj.Visible = true Err.Clear() What it should do i...

WSH - List Available Functions

I would be interested to know if there is any way for a script to obtain a list of available methods/functions within a Windows Script Host (VBScript) being hosted by some parent application? If it was a .NET app, it would be using reflection, but I'm not sure if there is anything similar for WSH. ...

How to customize mass email in Outlook using VBScript?

Is it possible to intercept Outlook's send event and contextually inject something into each message body? For instance, let's say I want to customize each message to begin with "Dear [name], ", and the To field contains "Mary, Jane", then Mary's email would read "Dear Mary, [body text]", etc. The only way I can think to do this is to cr...

VBScript to Upload file to SharePoint DocLib

Hi All, I'm trying to automate the uploading of files to a SharePoint document library. I've run across countless posts (on this forum and others) but can't seem to get something that works. I'm not really a developer, though I have done some simple VBA and VB Script. What I'm looking for is a solution to automatically upload a file (....

VBS Script tab not null

Earlier I have made a script to grab certain lines from a tabbed delimited text file, first row with each of the following rows into its own .txt file. (so these .txt files are only 2 rows of text) Then it would move each .txt file by what text it found in the given tab in this case it was (1)(3) (second row - forth tab) here is the co...

Read HKU VB and VBA Program settings

How do I read a particular vb program settings or registry entry from the registry of the key "HKEY_USERS\S-1-5-21-1390067357-1965331169-725345543-1003\Software\VB and VBA Program Settings".A standardized way to read as the part after hikey_users and before software changes with the pc used,but the vb programs do write perfectly at the ...

Visual Basic or VBScript as Java Scripting Engine

Hi all, I consider implementing a ScriptingEngine à la JSR223 for Visual Basic or VBScript (because I don't know any implementation, except the abandoned BSF engine from IBM). I know it will take me some native programming, but I don't know where to start. One idea would be to integrate windows scripting host into java, maybe by using ...

Permission denied on creating a folder under wwwroot/vhosts/sitename/test using VBScript

Hello, I am trying to make my ASP page to create a folder on a directory path. I am getting an error: Microsoft VBScript runtime error '800a0046' Permission denied I now its somthing to do with IIS 7 IUSR permission for the folder. The code is below. <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% dim strUserName foldername= "myfol...

Excel Macro: Select cells on condition and use as data validation list

Hi, I'd like to select all cells (except the first one) from column A of sheet B that are not empty, and use it as the list for data validation on a range of sheet A. I already have code to add the validation: Cells.SpecialCells(xlCellTypeFormulas).Offset(0, 1).Select With Selection.Validation .Delete .Add Type:=xlValidateList,...

How to designate a property as the Default Property for a VbScript class

Given that one can define a class in VB Script, is there any way to specify a default property for that class? e.g. Given Class MyClass Private myName Public Property Get Name() Name = myName End Property end class Is there anyway I can say that Name is the default property? NB: To do this in VB6, one would a...

how do I execute several programs consecutively in vbs

I have a couple of applications that I would like to execute one following the other. how do I do this? I tried this but the second task never executed. on error resume next Set WshShell = CreateObject("WScript.Shell") WshShell.Run """C:\Program Files\my folder\do task1.exe.vbs""" WshShell.Run """C:\Program Files\my folder\do task2....

QTP Visibility Issue with a strange solution

I'm testing a Java web application on QTP. In one screen, not all fields are visible initially (ie: they're 'below the fold'), so this: Browser("x").Page("y").JavaApplet("z").JavaInternalFrame("a").JavaEdit("txtName").Set "bob" Causes an unspecified error to occur. But if I change it slightly, to: Browser("x").Page("y").JavaApplet(...

How to start stop Windows Services using Scripting Language like Vb Script or something?

I Just want to manage Windows Services through Scripting languages( VB Script or Something ). Like Starting, stopping, Getting the status, Checking the dependencies etc. Please help with Code snippets or URL referances. ...

Sending email in Outlook to one person that shows multiple recipients?

I'm using VBScript and CDO to send emails from a custom form in Outlook. Basically: Sub MySendButton_Click() Set objEmail = CreateObject("CDO.Message") objEmail.To = "[email protected]; [email protected]; [email protected]" objEmail.HTMLBody = "<b>hi!</b>" objEmail.Send() End Sub Is it possible to send an email to only "[email protected]" but show all three recipien...

Trying to create multiple folders with VBScript

I need to create A set of empty folders, starting at 10, going to 180. This is the script I'm trying to use, but it just creates 10, and nothing else. Option Explicit Dim objFSO, objFolder, strDirectory, i strDirectory = "\path\to\main\folder" Set objFSO = CreateObject("Scripting.FileSystemObject") i = 180 While i < 180 Set objFold...

How can I maximize, restore, or minimize a window with a vb script?

I need to be able to make separte .vbs files that will (when triggered with a keyboard short-cut) will make the active window maximized, minimized, or restored. How can I do this without downloading and installing (not allowed here) a separate package. ...

IIS 5.1: Programmatically Create Virtual Sub-Directory

Background I'm trying to automate the creation of Virtual Directories based on the location of an existing Virtual Directory and its sub-directories. Example: C:\WebSites\Parent\NewVirtualDirectories Where Parent is a Virtual Directory and NewVirtualDirectories contains any automated Virtual Directories. Problem Using the followi...

Problem regarding VB script

How can we read the text file character by character using VB script ...