Hi,
I am creating an HTA application to be run inside of a WinPE 2.0 environment.
The purpose of this HTA app is to prompt the user to select a back-up location. I am currently using BrowseForFolder to prompt the user folder location. Script works fine in Vista.
However, this does not work in winpe 2.0 - and a dialog appears with n...
I am working on a code base which as VBScript code embedded in HTML. I've noticed the following two different tags around said lines of code
<%= MyFunc(val1) %>
and
<% MyFunc(val1) %>
What is the difference in using the "=" character at the beginning of these sections?
...
I'm trying to call a .NET component using interop from a classic ASP page (VBScript). If a .NET function returns a "System.String", is there a way for me to use that as a VBScript string? Is there something I need to do to convert it?
...
I want to write a script that can run on a vanilla Windows (XP or later) system and call methods in an installed (GAC'd) .NET assembly. (I need to deliver the script to other people and I don't want to assume that they have anything in particular installed (other than the the assembly in question). Can I use JavaScript (JScript) or VBS...
Having just created a SQL Agent Job I thought it would be handy to be able to write a little bit of information into the job's history, in case I wanted to check it later.
I was using VBScript in this instance, and noted that I could use the Error object to record info in the history, for example:
Err.Raise 999, "The code died"
If yo...
Hey all,
I need to use VBScript and loop through a set of registry string value names located within a specific key such as: "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" and delete all the string values except for ones that I specifiy.
I was able to successfully delete a specific string value using DeleteValue and...
I'm rounding up my decimal values to integer values
ex:
I have 5 numbers whose % sum should end up being 100% but i get 101% my values are
11.11111, 80.55555, 5.55555, 2.77777
and on rounding them i get
11, 81, 6, 3 => 101
In above for example 5.555556 rounds up to 6 (correct value) but is screwing up my total for percentage wh...
Hi,
I have about 80 emails, all with attachments which I would like to save to a folder on my hard drive. Rather than open each message and go to save attachments, I'm looking for a script that can do this? Anyone know of how this can be done?
Thanks,
...
I'm working on a project to capture various disk performance metrics using VBScript and would like to use a sub procedure with an object as an argument. In the following code samples the object I'm referring to is objitem.AvgDiskQueueLength which will provide a value for the disk queue length. I haven't found a way to make it work since ...
This is a follow-up to my previous questions (Copy Update Create VBScript and File Folder copy). So far I have the following script to copy files using xcopy:
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set wshShell = WScript.CreateObject("WScript.Shell")
strUserName = wshShell.ExpandEnvironmentStrings("%USERNAME%")
' Disco...
I have code similar to
Dim A, B, C
Set rs = Server.CreateObject("ADODB.Recordset")
strSql = "Exec [dbo].[some_sp] IND"
rs.open strSql,CN,3,3
Do While Not rs.EOF
'these columns are returned as decimal(10,2) format
A = rs("col1")
B = rs("col2")
rs.MoveNext
Loop
C = A + B 'i get type mismatch error here
And I used response.write to c...
I have the following VBScript script that checks the password expiration of an Active Directory user account. Could someone please help me convert this code to C#? Thanks a lot.
Const ADS_UF_DONT_EXPIRE_PASSWD = &h10000
Const E_ADS_PROPERTY_NOT_FOUND = &h8000500D
Const ONE_HUNDRED_NANOSECOND = .000000100
Const SECONDS_IN_DAY ...
I am new to VB Scripting.
I want the VB script to act according to an event of an application.
Eg : The VBScript should wait till a popup message appears in an application.
...
I am searching for a VBScript that does a search and replace in files (e.g. 1.txt 2.xml).
I have file "1.txt" that inside there is the word "temporary" and I want to change it to "permanent".
Because I get this file a lot I need a script for it.
Every time that I try to write a script that contains open a txt file and the command replac...
Hello,
I have a VBScript function in my ASP.net Page I have a small test function as shown below
<script type="text/vbscript">
sub testmePlease()
msgbox("Hello World")
end sub
</script>
I have a button in my webform and I am calling the function onclientclick as shown below
<asp:Button ID="btnAccept" runat="...
I'm trying to create and use a .NET StreamWriter object inside a classic ASP page (VBScript). Normally I would create the object like this:
Dim writer
Set writer = Server.CreateObject("System.IO.StreamWriter")
However, the constructor for StreamWriter takes a Stream object as a parameter, and the call to CreateObject fails. Even if I...
What is a good way to measure code execution time in VBScript?
Or failing that how to do it in JavaScript?
...
I've been exploring options for expanding my QuickTest Professional scripting capabilities, and came across this article this morning, so I decided to experiment a bit. The code below works fine when executed inside the QTP environment, but I could see a use for this outside of the QTP environment as well. Unfortunately, it is causing an...
I have a mysql database containing upc numbers that I would like to print to labels with a zebra printer (LP2824). I would like to somehow be able to send those numbers directly to my label printer, which is not the default printer without the user being prompted.
As far as I can tell, IE is the only option as some type of activeX contr...
I have a .bat file that I run every night to "hit" a webpage. The batch file has one argument, the URL
webrun.vbs http://www....
Here is the webrun.vbs script below. Anyway, I'm running this script on two servers. One has DNS set up and is accessed like http://www.domainname.com
The other server doesn't have DNS set up yet and is ...