vbscript

File creation by using Vb script

I need a VB script which will create text file named "listitem" in C:\Documents and Settings\All Users\Application Data\secon\smartapp up to C:\Documents and Settings\All Users\Application Data\ we can make it as 'CommonAppDataFolder' Any one knows about this ...

read out a txt and send the last line to email adress - vbscript

Hallo, I'm back haha :-) so i have the next question and i hope someone can help me... I know i have a lot of questions but i will try to learn vbscript :-) Situation: This script read out (every 5 min) the last line of a txt and send it to my eMail Address. Problem: I'll check the txt all 5 min, but at the moment every 5 min there co...

How to work with large numbers with vbscript

Hi all! I'm creating script for automated testing of financial application. Using VbScript as language. Need to manipulate with large floating point numbers (more than 10 billions) - make add, multiply operations and so on. But vbscript doesn't have data type for large numbers. Please, advise me any solution or workaround for this pr...

VB script + how to create MsgBox with two buttons

Hi Dear friends How to create MsgBox with two options in VB script For example The Msg Box include two buttons the first button name: ON the second button name: OFF THX Yael ...

Upload file and parse in classic asp

Any ideas how file uploading and (simple) parsing can be done through pure ASP? I have various upload scripts, but they all either save a file to a folder or in a database. I can't seem to modify these examples correctly to put the file in an array. Here's the 2 scripts that I'm currently using: http://www.asp101.com/articles/jacob/sc...

How to use substring in vbscript within a xsl page.

I am trying to replace the double quotes in a string with a single quote, got the following code but get error message saying "Object Required strLocation" Sub UpdateAdvancedDecisions(strLocation) Dim d Dim strLLength strLLength = Len(strLocation) - 1 For d = 0 To strLLength alert strLocation strValue = strLocation.Su...

How to disable button when checkbox is checked.vbscript

How to disable button when checkbox is checked and enable it when a condition is met using vbscript. ...

Vista batch or vbs? read,write txt files, compare strings, run svn cmds.

Would like to create a script that runs as a scheduled task in Vista to perodically check the revision number of an SVN repository. Compare the svn revision number to a revision number in a local text file. When the revision number changes do stuff. Overview: Get the current svn revision number. Store it in a text file. Read a one l...

how to solve object required error in Classic ASP

How to solve the object required "checkMultiple" error. any idea how to disable the cmdButton7 when checkMultiple is checked and enable it when sum = 100. using VBSCRIPT. Sub disableButton() If checkMultiple.value = 1 Then document.form1.cmdButton7.enabled = False ElseIf sum = 100 Then document.form1.cmdButton7...

object required error

I'm trying to implement a function that will disable the cmdButton7 when checkbox checkMultiple is checked. and enable it again when sum = 100 using vbscript , asp.net. I tried the method below: Sub disableButton() If document.form1.Multiple.value = 1 Then document.form1.cmdButton7.enabled = False ElseIf sum = 100 Then document.form1....

how to disable button when checkbox is checked. vbscript.

Hi all, needs help with this problem Errors: Product required "disableButton" and product required "checkMultiple" Sub disableButton_onclick <br> If document.form1.checkMultiple.value = 1 Then<br> document.form1.cmdButton7.enabled = False<br> ElseIf sum = 100 Then<br> document.form1.cmdButton7.enabled = true<br> End If <br> End Sub<b...

Access denied error with MSXML2.ServerXMLHTTP

I'm receiving an intermittent "msxml3.dll error '80070005' Access is denied." error. The object always posts back to the same domain. I don't quite know why it works sometimes and why it fails other times. This is Classic ASP - VBScript set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "POST", "http://xxxx.com/GetCache...

How could ASP server-side code corrupt a smart quote ’ ?

My company just converted many columns from varchar to nvarchar. Now it seems that when we render a smart quote (i.e. ALT+0146 ’) to the screen and then send it back to the SQL Server 2000 database for persistence, the smart quote gets corrupted to - ’ -. My Question: How could ASP server-side code corrupt a smart quote ’ ? EDI...

creation of a text file in a specified location and remove the old one

I need to create a text file "setup.txt" in the location C:\Documents and Settings\All Users\Application Data\xerox\setapp in VB script the location C:\Documents and Settings\All Users\Application Data is common apllication data folder here we can use word "CSIDL_COMMON_APPDATA" or &H23& for that.Here the other which i need to take care ...

vbscript error 800A004C

i need to create a text file named "listfile.txt" in the folder C:\Documents and Settings\All Users\Application Data\netapp\system so i did the following vbscript to acheive that Const CommonAppData = &H23& ' the second & denotes a long integer ' Const OSCPATH = "\netapp\system" Dim fso, MyFile Set objShell = CreateObject("Shell.App...

How do I read a .msg Outlook attachment in Outlook VBA/Scripting?

Hi, I've got a script that's trying to open text attachments and append them to the message body. I have it working for text documents but I ideally need it working for .msg attachments too. At the moment it just doesn't read the object. Can anyone help? Thanks! Sub RunAScriptRuleRoutine(MyMail As MailItem) Dim strID As String Dim ...

How to get system uptime in the last 24 hours

I know how to get Windows system uptime since last reboot in VBScript or C#, but how do you get system uptime in the last 24 hours? The machine could go down multiple times during this period. ...

Script to determine if an HTTP reponse is from intended domain.

I am trying to write a script that will send an HTTP "GET" to a URL then determine if the response came from the same domain or not. I have been playing around with VBS and the WinHttp.WinHttpRequest.5.1 object. Sadly this does not give me any access to where exactly the response came from. I tried parsing through the response header...

use vbscript to modify a text file

Every day we get a flat text file. Some days there are lines in the file that need to be deleted before it can be processed. These lines can appear in different places, but always start with the characters 6999 or 7999. We would like to run a script that will delete these particular lines. However, and this is way beyond me, any wher...

VB script + find under which directory I am (like pwd for linux)

hi all How to get the path of the local directory that I run my VB script For example I have text.vb script I need to add to this script VB code that finds the PATH of the directory that I run the test.vb script (like pwd for LINUX/UNIX) THX Yael ...