Все вопросы: [vbscript]

584 вопросов

похожие теги:
0
голосов
1ответов
1102 просмотров

VBScript building a parameterized query

Is it possible to build a VBscript parameterized query without knowing the names, types or number of arguments beforehand? I'm trying to do this: set cmd = Server.CreateObject("ADODB.Command") cmd.ActiveConnection = cn cmd.commandText = proc cmd.commandType = 4 cmd.Parame...

0
голосов
5ответов
1292 просмотров

Regex challenge: Match phrase only if outside of an <a href> tag</a>

I am working on improving our glossary functionality in a custom CMS that is running with classic ASP (ASP 3.0) on IIS with VBScript code. I am stumped on a regex challenge I cannot solve. Here is the current code: If InStr(ART_ArticleBody, "href") = False then sql="SELECT URL, Term, Re...

0
голосов
2ответов
681 просмотров

I found this Reboot Vista.vbs script. Can you help with it?

Found this Reboot Vista.vbs script on a number of forums. Seems like the whole post ( text including the code ) was posted on many forums. So I don't know who the original author is. Heres the code here: Option Explicit On Error Resume Next Dim Wsh, Time1, Time2, Result, PathFile, MsgResult, Msg...

0
голосов
2ответов
3804 просмотров

VBScript - image to binary

i'm not a VB programmer but i need a vbscript that convert image file (from local disk) to be converted to binary data and the passed to webservice. I realize how to pass data to webservice but i can't find how to convert the image file to binary data. I spend a lot of time to find some kind of s...

0
голосов
4ответов
7902 просмотров

How can I script copying an Access table from one mdb to another?

I've inherited a setup that utilizes Access 97 databases. I need to copy a table from one main mdb to multiple others to prep them for use. The source mdb and source table are mostly static, the destination mdbs vary widely. So, I have: source.mdb contains table A destination.mdb contains tables...

0
голосов
2ответов
851 просмотров

Finding a UNC Path on another server?

I'm need of some way of finding the UNC Path of a share via a script or command line or even a custom created program. I'm trying to automate deletion of users and the setup is a bit complicated. Home folders are set up like this: We create a folder on a Disk on a fileserver. When this folder i...

2
голосов
4ответов
4693 просмотров

ASP and ADO error: No value given for one or more required parameters

Language is vbscript and classic ASP. The following SQL works when values are hard coded in the sql statement: sql = "UPDATE STORE2_ITEM SET sku = 'abcd' WHERE id = 224 and host_id = 1" What I'm trying to do is add parameters so I replaced the field1 assignment with the following: sql = "UPD...

34
голосов
6ответов
39820 просмотров

ByRef and ByVal in VBScript

I'm facing something weird in VBScript. When writing a procedure where I want the parameter to be passed by reference, the way of calling this procedure changes the way the parameter is passed ! Here is an example : Sub IncrementByRef(ByRef Value) Value = Value + 1 End Sub Sub IncrementByVa...

6
голосов
2ответов
20797 просмотров

VBScript to Write a Macro within an Excel file

Is it possible for the VBScript to write a Macro within the excel file when it is generated that would be able to run whenever the file is opened? Ive got a VBScript to auto generate an excel file and some data within it, this runs once and generates the file with all the data/sorts etc. What I...

0
голосов
2ответов
286 просмотров

Deleting (near) Duplicate Files

What's the best scripted way to delete (near) duplicate files based on filespec in Windows (XP in this case)? I am thinking of RegEX and some VB Script but if there is a better way... Examples include filenames that slighlty differ in name either with one or two (known) extra characters at the e...

19
голосов
7ответов
81940 просмотров

VBScript : checking if the user input is an integer

Within a VBScript, I need to make sure the user inputs a integer. Here is what I have now : WScript.Echo "Enter an integer number : " Number = WScript.StdIn.ReadLine If IsNumeric(Number) Then ' Here, it still could be an integer or a floating point number If CLng(Number) Then WSc...

0
голосов
3ответов
2784 просмотров

Problem creating a VBScript function

I'm trying to create a simple VBScript script, in this I need a function that takes a file path and returns true if there is a file there, and false if there's nothing. I'm using the following code: Function FileThere (FileName As String) As Boolean FileThere = (Dir(FileName) &gt; "") End Funct...

0
голосов
2ответов
5922 просмотров

Installing an exe file -VBSCript

I use the following command to run a exe file which is in the network drive through a vbscript: wsh.Run """\lonmsc01\apps$\EWebEditPro\Version 4\ewebeditproclient4.exe""" This installation pops up with dialog boxes to choose the setup type As Resintall or Remove and proceeds on by clicking on ...

0
голосов
2ответов
827 просмотров

how to display current time with chosen timezone?

how to display current time with chosen timezone instead of server TZ? (VB)

0
голосов
1ответов
5775 просмотров

How to select files within a folder?

I want to came out with a program which can open folder by reading the path from textfile. When open, the code will check if there is files inside the folder. for the first file, do some calling function, it will keep doing until the last file available in the folder. for example, if the folder...

2
голосов
1ответов
1581 просмотров

Regular expression for removing quotes from quoted numbers in a string

Let's say I have a bunch of text like this (simplified example, but you get the idea): INSERT stuff(a,b,c) VALUES('1','a','1'); INSERT stuff(a,b,c) VALUES('2','b','1'); INSERT stuff(a,b,c) VALUES('3','c','2'); INSERT stuff(a,b,c) VALUES('4','d','2'); INSERT stuff(a,b,c) VALUE...

0
голосов
2ответов
23128 просмотров

How do I automate a right click in VBScript?

I want to automate simulation of a right click to open the context menu. Once the menu is open, select the selected action/shortcut available. I know how to open: WshShell.SendKeys("+{F10}"); Or using the AutoIt automation language (BASIC like): ;--on right click event MouseClick("righ...

6
голосов
7ответов
10687 просмотров

VBScript, JScript, Wscript ... oh my

I need to write some scripts for WinXP to support some of the analysts here at Big Financial Corp. Please help me decide which type of windows scripting best fits my needs. My needs seem pretty simple (to me anyway) run on WinXP Pro SP2 (version 2002) not require my users to install anything ...

0
голосов
3ответов
10586 просмотров

Problems with Recordset Filter

I'm having trouble with a filter on an ADO Recordset in legacy ASP Classic code, and I'm trying to understand if what I'm trying to do is not supported, or if I'm just doing it wrong. I have a recordset of Items, and they have a Status of 1 (active) or 0 (inactive), and an optional End_Date. In...

2
голосов
3ответов
518 просмотров

With Powershell quickly growing in popularity, is there any reason to learn VBScript?

This is more a general question than anything. I know that VBScript and Powershell can do a lot of the same things and each does things the other can't, but I'm wondering if there's any reason to still learn VBScript or if efforts are best directed into learning Powershell. /matt

1
голосов
1ответов
2170 просмотров

Different decimal separator in VBS between Windows and DOS

I'm running the following VBS script in Windows XP, french version, localised for Switzerland. The configured decimal symbol is . (dot) (in Settings-&gt;Regional Options) Here is the script (named test.vbs) : MsgBox CDbl("3.456") &amp; vbCrLf &amp; CLng("3.456") If I run it from Windows (I'm...

4
голосов
3ответов
20728 просмотров

does document.getElementsByTagName work in vbscript?

Well, it works, it just doesn't produce anything worthwhile: elems = document.getElementById("itemsTable").getElementsByTagName("TR") for j = 0 to ubound(elems) - 1 ' stuff next Well, that won't work, apparently elems is an object, not an array like you'd get in that fancy javascri...

1
голосов
1ответов
357 просмотров

IE scripting security settings

I am working on a tool that accepts an html string, downloads any images found in the code and replaces the image sources with the new local urls. When an image source redirects to another url, I get an access denied error on the request for it: msxml3.dll error '80070005' Access is denied. ...

0
голосов
1ответов
303 просмотров

Auditing Windows Server 2003 folders

Is there a way to log which Active Directory authenticated user modified a particular folder's contents in Windows Server 2003 environment?

0
голосов
1ответов
1719 просмотров

Displaying text with VBScript when running from command prompt issue

I have a script that pings a list of computers and tells me if I can be reached. For each computer I would like it to display whether or not it was reached on the command prompt, not as a pop-up message. I did Wscript.Echo, but it does a pop-up for each computer so it's really annoying to have to...

0
голосов
1ответов
154 просмотров

Detect if Access Application has error

I want to write a script or program to detect If the MS Access application running without errors. If there was an error I would like to know the error number. Is it possible? What is the best way? I would like to write VBScript and run it every 30 minutes. The Access Application that I have is o...

2
голосов
2ответов
674 просмотров

Build automation, VMWare server 2.0, Final builder

I have a database in a VMWare Server 2.0 Virtual machine. I also have a web application in the IIS (7) in the VM. Now I want to execute some database scripts that are in the VM, from the Host machine. Also I have a VB script in the VM that I want to run from the Host machine. How do I go about ...

1
голосов
2ответов
2377 просмотров

Encrypt in VBScript/ASP Classic, Decrypt in PHP?

I'm looking to encrypt a string in VBScript, and decrypt it in PHP. I have full control over the VBScript/ASP Classic environment, but zero control over my PHP environment. Given this, what sort of encryption could I use that would be adequate enough to secure a string? Apologies for the vague...

1
голосов
3ответов
2587 просмотров

Hot to call to ASP.NET file from VBS file?

How can I call to a ASP.NET file (.aspx) from a VBS file that are both on the SAME server ? I need that the VBS file will execute the asp.net file with some parameters. Thanks

0
голосов
1ответов
749 просмотров

Executing VBSCript in COM dll using .Net and Interop

I have a VB6 application that I am converting to .Net in phases. The current phase requires .net to make a call to a VB6 dll through interop to execute VBScript using the MS Script control. Other than the process being "convoluted" are there any known issues with this setup? Sometimes nothing i...