vbscript

Refreshing Windows TaskBar with VBScript for windows?

There is a VBScript (.vbs) script that someone made here at my company. It opens and closes certain application, this application has a tray Icon and each time it closes (kills via console) the application the tray icon remains. So after one or two days running the script millions of icons of the application remain on the taskbar. Is th...

How to call DLL function in vbscript

I am writing VB script in which I have to call a function of a COM DLL. The fuction which I want to use is in structure and thus I want to create the object of that structure to access the required function. e.g. I have a dll 'BasicCom.dll', in which struct abc { bool xyz(); } Now I want to call xyz(). Is any one have any idea, h...

VBScript to detect today's modified files in a folder (including subfolders inside it)

Hi All I need to get all the modified files inside a folder including the subfolders inside it, and copy them to another folder. How can it be done using VBScript or any other way to achieve this? Thanks in advance, Bibhu ...

How to Sign a ActiveXControl or VB Script file?

I am using an ActiveXControl object called DSO Framer downloaded from Microsoft site. Wrote a few lines of VB Script code to do additional functionality named as Document.vb. Now I would like to sign these two files to avoid warning at the browser side. How to sign them? ...

Need help for configuring COM+ Service programmatically using C# or script

Hi All, Is it possible to programmaticaly configure COM+ service. I need to do the following using C# or any script Open Administrative Tools -> Component Services Expand Components Services -> My Computer -> COM+ Applications Right Click HyperV Environment Manager(COM+ service name) andselect Properties. Click on Pooling & Recyclin...

Get job status of fax send via Microsoft Fax Server (SBS2008)

Can someone provide my with a straightforward VBScript to check a fax job's status by referring to a known JobID? Handling a fax job event is not an option for me. Thx. ...

Read bytes array

In web service I have function that return bytes array. Now, I call it from VbScript and I need to catch result of this function. How I can catch result of this function in value that is gone be like a value that function return (bytes array)? ...

In ASP - Why is it that I can call python functions from vbscript but not vice-versa?

I'm planning on writting some new code for a legacy ASP application in Python, and I ran into some odd behavior. If I write a function in python I can easily call it from a VBScript block. However, if I try to call a function defined in VBScript from python, I get an error: Python ActiveX Scripting Engine error '80020009' Traceback (...

Can't create object: ADODB.Stream

Hi! I am trying to create ADODB.Stream object in VBscript. This is the function: Function ByteArray2Text(varByteArray) 'Convert byte array into a string with ADODB.Stream 'Data should be real plain text because binary data will be mangled Dim byt Const adTypeText = 2 Const adTypeBinary = 1 Set byt = CreateObject("ADODB.Stream") ...

Use vb.net in VBScript

Hi! How to call a function in vb.net DLL from VBScript? I did the following: - I create public class named Class1 in vb.net. I go to Visual Studio 2008 Command Prompt and go to my class dll - C:\Myapp\bin\Debug and type following command tlbexp myDLL.dll after that i get message Assembly exported to C:\Myapp\bin\Debug\myDLL.tlb Aft...

VBscript stream

Hi! In VBScript i need to convert array of Byte in value that gone be stream data type. Is there any way that i do this with out creating ADODB.stream object? ...

VBScript: Error 10023 in : Array index out of range (trouble when reusing an array variable)

Using Sax ActiveX Scripting (long story), I have 3 nested if statements which reuse the same return variable. Script looks roughly like: Dim rtnArray As Variant If variable1 <> "" Then ' Perform SQL query against DB2 database rtnArray = DB2SQLSearch(Query) If UBound(rtnArray) = 0 Then ' ditto rtnArray = DB2SQ...

VBA basic script for reading xml data?? Resource for learning this method??

So I was just looking for basic examples of reading xml structure data with visual basic subs/scripts. specifically, if possible, how can i take structure data of xml, read the data with some vba, and lay it into excel spreadsheets? or just a learning resource for this type of thing. thanks very much! ...

Is this a proper XML syntax

I was wondering if this was a proper XML syntax, because I need to remove a node in this document using VBscript and I really am not able to do it. <?xml version="1.0" encoding="utf-8"?> <dbm> <servers> <server name="PCTEST"> <references> <database name="TES1" path="\C$\Build"/> </references> </server> </...

Set focus to the end of table inside of div when adding a new row.

I have a table within a div with a set height, when the table is bigger than the div the scroll-y bar appear. The problem is that if the scroll bar of the div is at the top, leaving other row at the bottom hidden, and the user press the button to add a new row, this row is added at the bottom of the table, therefore you can't see it. Is...

Which method will perform better? (Or is there not enough of a difference to matter?)

Which (if any) of the following will give the smallest performance hit? Or is the difference so small that I should use the most readable? In the same page I've noted 3 styles used by previous maintainers: Method 1: If (strRqMethod = "Forum" or strRqMethod = "URL" or strRqMethod = "EditURL" or strRqMethod = "EditForum") Then ... End...

VBScript - Create and collect value from array

Hi, I'm trying to figure out how to write a vbscript that does this: I've got a system of checkboxes which represents a type of software. And each of these checkboxes are collected into each own boolean variable. For each of these 'true's I want to send an e-mail. How can I do this using a "for each" loop or something? ...

Creating and writing lines to a file

Is it possible to create a file and write lines to it in vbscript?Something similar to echo in bat file (echo something something >>sometextfile.txt).On execution of the vbscript depending on the path of the script would create an autorun.inf file to execute a particular program (\smartdriverbackup\sdb.exe).Also how can I strip/remove th...

Is there a utility to tidy VBScript ?

I'm wanting a tool to tidy VBScript code. I'm looking for something to do the same job as perltidy for Perl, or astyle for C++ and Java code. I've looked, but failed to find anything here or via Google. Open Source software would be preferred. Can anyone point me at one please? ...

Read an MST file with vbscript

I'm trying to do a script that gets information out of some MSI and MST files and write it into a text file. I achieved reading the MSI files. However, I get the following message. Msi API Error 80004005: OpenDatabase, DatabasePath, OpenMode 1:2219 2: 3:4: I open the file like this Set installer = Wscript.CreateObject("WindowsIns...