vbscript

Vbs - Can't create Word.Application

Hi, this is pretty strange. I'm trying to run a pretty simple vbs code from a terminal server and I have amongst others, this line: Set objWord = CreateObject("Word.Application") Strangely enough, this worked yesterday. But now, all that happens is that wscript.exe just seems to hang. I even tried to put a messagebox before the creati...

processing 2 dimension array

Hi, I am working in classic ASP; using getRows to get multidimension array of rows and column. while iterating a row; I want to pass that single row into another function to build the column layout. with C# I can do this: obj[][] multiDimArray = FunctionCall_To_InitializeArray_4X16(); for (int rowId = 0 ; rowId < 4 ; rowId++) { Funct...

VBScript Outlook Form How do I set the To Field based off the value of a ComboBox?

I'm using Outlook 2007 and trying to design a form that changes the To: field based on whatever is in a ComboBox1. Simple right? I thought so, until I found the documentation extremely lacking. Everything is point me to VBScrip and I have googled to exhaustion on the topic of setting the to field in vbscript. Can someone with some out...

Issue related record set sheet in database connectivity...

Hi, Please find below the code.. Function Connect_to_db(Byval mfgprt) Dim cnn,rss Set cnn = CreateObject("ADODB.Connection") Set rss = CreateObject("ADODB.recordset") cnn.ConnectionString = "DSN=QTPDSN;Description=desc;UID=;PWD=;APP=QuickTest Professional;WSID=;DATABASE=;" cnn.open rss = cnn.Execute (""select ...

Adding string in existing url using VBScript

Hi Guys, I am using VBScript for programming I have three vairables and there value is coming through vbscript program. publicationPath = "/test/english" publicationUrl = "/101/english" publishedPath = "/test/english/about/india/delhi.aspx" Now if you see the publicationPath and publishedPath's "/test/english" is same. Now I want ...

Enabling MS-Access functions to be called from a VBScript With only Run-Time installed

Specifically, I'm running into this. I want to call a function that resides in a MS-Access mdb file. Unfortunately, the box that it's going to be run from (Windows Server 2003) does not have Access installed on it. I installed the runtime environment onto it just fine and it can open up the file normally and everything, but it can no...

How do you suppress script errors in HTAs?

I have an HTA that loads up an external webpage inside a nested IFRAME. This webpage (which I don't have control over) throws an "Access Denied" error in my HTA asking the user if they "want to continue running scripts on this page". What I want to do is have my HTA suppress all scripting error messages regardless of where they originate...

ASP/VBScript generated Excel file is blank

Hi all, I have a bit of code that I've used many times to export an HTML table into an Excel file, and it works fine. But now I have a new report that I need to be able to export that works fine when viewed as an HTML page, but viewed in Excel the entire spreadsheet is blank - no grid, no data, nothing. <%Response.ContentType = "applic...

How to retrieve startup folder location in 64-bit Windows

I have a VB script that adds a program shortcut to the Windows Startup folder. In my script, I'm able to retrieve the Startup folder location in 32-bit Windows with this: Set objShell = CreateObject("WScript.Shell") startupFolder = objShell.SpecialFolders("Startup") but it returns nothing when I try this on 64-bit Windows. Speci...

jscript+wsh can't launch notepad.exe, vbscript+wsh can. Why?

Never mind, I solved it. It should just be <a href="#" onclick="runnp()">Run notepad.exe</a> Original question: I'm trying to write a webpage that will launch programs on my local computer. How come only the vbscript version works? Nothing happens when I click the jscript link. <html> <head> <script language="VBScript"> Sub ...

Call oracle stored procedure from ASP VBSCRIPT with input and returned parameters

I connect to an oracle database from an ASP-VBSCRIPT website and want to execute a stored procedure which accepts input parameters as well as returning some. The stored procedure is the following: p_std_currency.get_currency_details(input1,input2,input3,input4,output1,output2) Input 1-4 are the parameters (3rd is dat...

Microsoft VBScript compilation error '800a041f': Unexpected 'Next'

Hi, I'm trying to program a multiplayer tic-tac-toe game in VBScript/ASP. Here's the code on wich the error above occurs: For x = 1 To 3 If AllEqual(arr(x,1), arr(x,1), arr(x,1)) Then If arr(x,1) = GetText(currentplayer) Then bWinner = currentplayer Else If arr(x,1) = GetText(0) Then 'nothing to do Else If GetNumber(a...

Uninstall application which prompts using VB Script

Hi I have an application which was deployed some time ago using an .msi and a .mst When I now try to uninstall the app using msiexec /x name_of_msi TRANSFORMS=name_of_mst /qb! I get a prompt asking if I would like to remove the ini files which were installed. Is there any way to uninstall the application and answer "Yes" to the prompt...

Classic ASP Auto Suggest Like Google

While working on a project i came across a functionality in which i need to implement auto suggest textbox using classic asp. I did it and it works fine. I'm using XMLHttp Request object to pick the database column values when user enter something in textbox. Everything works fine. But if the table have too many rows (37,000+) in it, t...

open pdf at specific page using vbscript

I have an application that manages multiple magazine PDFs on the hard drive. I need to open the PDF files into a specific page. I am able to call vbscript from my own software so I am looking for some vbscript snippet to open a PDF with a specific page loaded. I am a mac developer doing cross platform software, windows is not my standard...

MSXML2.ServerXMLHTTP with SSL3?

Using VBScript, want to talk to a HTTPS website but it fails with: The client and server cannot communicate, because they do not possess a common algorithm Found out this is because it needs to use SSL3. How can I tell it to use SSL v3? Thanks ...

How to use the return value of a VBScript function into a VB application?

I'm developping an ASP.NET application, and I need to use an old VBScript file that would be really hard to translate into pure VB in a VB function. This VBScript is supposed to return an array that I'd like to use it in the VB function that called it. How could I call the VBScript function in my VB application and use the value it ret...

Link an Excel sheet to a Table in MS Access - Using VBScript

Hi, I am trying to create a Linked table in MS Access linked to Excel sheet. I want to do this through VBscripting. My Scenario is i will have a excel sheet which will be updated very often. But my script picks up the values from the table in MSAccess which should be a replica of the Excel sheet (Linked table). So i want to know if t...

vbscript and checking for null

Hi all, On the line "If (IsNull(value)) then" below is my code correct? I want to check if the registry key exists and if not then show a web page. Option Explicit On error resume next Dim SysVarReg, Value Set SysVarReg = WScript.CreateObject("WScript.Shell") value = SysVarReg.RegRead ("HKCU\Software\test\FirstLogonComplete") If (IsNu...

How to change the contents of a file included in an *.msi with VBScript

Given an installer generated with a VS2010 Setup Project, I would like to swap out a .NET DLL with another one without changing the name. I am already altering the msi file according to this question, swapping out the contents of an entry in the "Binary" table. I have located the file in question using Orca. It resides in the only cabi...