I'm writing an intranet-only browser based application. I need to launch either a SETUP.EXE that is on a network drive or a shortcut on a local drive that points to the exe on the network drive
I already know how to launch a local exe, for example:
Set objApp = CreateObject("WScript.Shell")
objApp.Run "cmd /C CD C: & Program Files & SomeFolder & SETUP"
I want to use vbscript to run a script multiple times and save its results to a text file. I have practically wrote this script before but only using a sql command wrote in to the script. However, this is a lengthy sql file so can not be directly entered in to the vbs script,s o I would like to run it using sqlcmd.
I have tried Googling this problem but found very little information about it. Any discussions online that I have found show no code and assume you already know how to do it.
I have found this so far:
Set objShell = CreateObject("WScript.Shell") Set objScriptExec = objShell.Exec("sqlcmd -S "&WScript.Arguments(0)&" -i "&WScript.Arguments(1))
But how do I get hold of the results in to some kind of variable?
I'm using Javascript for my site, using Dreamweaver to create the pages. On my SQL Server I have created a DTS package that first recreates a table and then imports an Excel file.
I have created a Stored Procedure to launch this package. This part works great if launched from Query Analyzer. I want a user to be able to push a button which will launch the Stored Procedure and then return the results of how many records were imported.
I work on an existing application in ASP, which requires an access to DBAccess. I work on Win2K Professional and launch ISS. I have created both an administrator and a user count. The fact is that I can't launch ASP file in a browser. It results in asking me whether I want to register the file or whether I want to open it with an application on the hard disk.
I use FrontPage to edit ASP files. Using this software allows me to see the result of html but not the results of query (using DBAccess). I have yet declared an ODBC source refering to my Access database. I have also nstalled IIS.
But I can launch it only when Administrator!?? I have declared a virtual path to my web pages. But impossible to attain them in Netscape or IE.
I'd like to launch an executable file from a web page. Basically, the user enters seven parameters and then clicks a button to generate a graph. The input is written to a file and then read by the exe. The exe then generates a graph based upon the input parameters.
I am reading about the Process class and wondering if that is the best approach to this. Can you recommend a KB article?
I would like to run an ASP page each day at the same time automatically. it reads from my product data and ftps the data to another server.
I am running on a windows system with IIS I have no idea where to begin. Is there anything else I can do? it is not my own server so I don't have access to server. I can just ftp.
I want to add an 'edit' link next to certain images that appears in my ASP application. When this link is clicked I want it to open an editor such as PhotoShop or MS Office Picture Manager with the picture. The only thing i can get it to do is to display the picture in the browser or ask me to download or execute the program.
I did some searching but couldn't find anything to help. It looks like other users with similar questions just gave up.
I have an asp page written entirely in jscript with a vbscript used as an include file which one variable on the page must access.
When the page runs, I run into jscript complilation errors when it tries to access the include file (since it is written in vbscript), and I can't figure out how to get the two to work together. How do you get both scripting languages to work on the same page?
Is there a function in VBScript that will return the name of the file that is currently being executed? Basically, I'm looking for a function that I can use in code similar to this...
<% response.write "The name of this file is - " thisFile.fileName %>
which will result in
The name of this file is - home.asp
being displayed on the page with home.asp executes.
I have a batch file that needs to execute every day and I need to run it in a silent/invisible mode. I looked up on the Internet and found this command: shell("batchfilename.bat").
Upon failure, learned that it is a Visual Basic command and not VBScript command. I wonder if anyone knows how to run a batch file using vbscript that runs in invisible mode?
What options/methos/properties/functions/objects do I have in order to create a Function in ASP/VBScript that process/create binary data as an image file type?
The Function is supoosed to get 2 parameters: 1. The file image content type defined as "image/bmp" , strContentType 2. the file binary data, binDataImageBytes (which is stored in session vars)
The Function should return/create an Image File , for instance ~tmpImg.BMP
My Question is How to create a binary Image file type from the session var binary data ?
I know this is a little off topic, but this is the best resource I know of for anything coding related.
I'm needing to read through a text file that will have the following format:
c:ools c:docs c:htdocs
And have the the results put in an array for later processing. What I'm trying to build is a small vbscript that will automatically backup each path that may be in a given txt file.
This doesn't work. There is nothing wrong with Session variables that I know of, both values are present when i write them to the page. Is it not possible to use vbscript within an include statement?
I am trying to dynamically generate links on a webpage base on a list of file using their title property as the link text. My problem is I don't know how to get the title property of the file. Is there a object or dll i can use?
i had a vbscript that will read the text file from the bottom to the top, and after reading the file, it will be displayed in the screen, and the code look like this: PHP Code: Code:
I have a page that creates a .CSV file that has been migrated over to Windows Server 2003 from Windows 2000 Server. It worked fine before I moved it, but now when it creates the .CSV file, and you open it, the first row opens in cell A1 and the second row opens in cell A2. Code:
is it possible to open an excel file (used as a template) from server using server-side vbscript; then modify it or add values from client using client-side vbscript?
the isp i'm using has authorized ssl on my site but i dont know how to tell a particular page that it can only be run as a secure page... Where at the moment u can view the page as https or http.
I'm assuming i need some code to detect whether its being run as a https and if not redirect it to https.
I have an ASP page, on the Window_OnLoad event I use VbScript to popup an Inputbox to accept a value from the user and put it into a string called strValue. I then want to be able to go (in asp)
<%Response.Write(strValue)%[color=blue] > - but if I do that nothing happens.[/color]
How can I access the Vbscript variable in the ASP part of the page?
I tried using some code examples from (URL address blocked: See forum rules) into my defualt.aspx page (in VS2005). I had some errors with this. I thought this might be cause the tutorial at w3schools.com said it was for *.asp files.
For example I had an error ("Statement cannot appear within a method body. End of method assumed) when I tried putting a SUB in the <head>. Like this
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "(URL address blocked: See forum rules)">
<html xmlns="(URL address blocked: See forum rules)" > <head runat="server">
<% sub vbproc(num1,num2) response.write(num1*num2) end sub %>
<title>Untitled Page</title> </head>
By the way if anybody will be available to answer basic questions like this every so often throughout the day (ie: check your email or this forum every couple of hours, until midnight California time December 8), I'd be willing to pay a reasonable amount. I just need help with some of the technical details like this + finding source code
I manipulate MSAgent AcitiveX object using VBScript at client side, I met a wierd problem when I debugged my ASPX page. when msagent recognize a phrase and fire event, my vbscript capture the event and do something, including make the agent do some animation and speech, then open a browser window using 'window.open "www.google.com", "Google" '. the code works fine when I view the ASPX page with browser inside VS.NET, when browse this page in web browser from the localhost, the agent works fine, but the new window did open up. why?
I have COM+ component installed on my XP. I have problem to create instance of it inside vbscript. How can I do it? The error I get is : ActiveX component can't create object.
I'm trying to create a simple recordset, and would like to include an and/or option. to do this i set up an option on the previous page,and then sent the selection through to the next page. i was then hoping to simply insert the variable i had created into the code so that whichever of and/or is selected is used in the code. i.e.
where and_or is the variable from the previous page.
Search.Source = "SELECT * FROM dbo.Employee_List where First_Name='"&firstname&"' '"and_or"' Last_Name='" &lastname&"'"
so basically whenever someoned chooses an option its automatically filled in at the indicated location in the code. is it possible to do this and if so what is the correct syntax for using variables within this code?the full search function will have numerous fields so i'd like to avoid using if statements.
I'am running window server 2000 and MS frontpage on my computer. I created ASP page with the frontpage editor. The asp code are not running when I am trying to view the page with my browser (Explorer 5.0). Could you please help me
I have an ASP.NET solution,and the ASPX page I have a form ,I want to copy some of the data from that form to the clipboard,I am using the below script the script works fine when I use a normal anchor tag with the onclick event,but I want to be able to use an actual asp control like the hylperlink or linkbutton.
I have tried the link button but it gives an error saying Compiler Error Message: BC30456: 'VBScript' is not a member of 'ASP.sr_aspx'.
And the hyperlink control doesn't seem to have an option for the onclick. The code is located in the .aspx not in the .vb.
I have absolutely NO knowledge about ASP. Though I've been working with PHP for almost 2 years and decided that I need to take the next step and learn some more languages both to keep me busy and to expand my skills.
Like I said...I have no knowledge or experience with this. From what I read, there are two ways of coding ASP. First using VBScript and then C#. I'm really confused, because for one, I don't know what the difference is, and secondly I'm ot sure which is the best.
I'll be primarily (if not only) be using ASP to build online applications, websites, etc.
a dictionary of terms with definitions, (in a database) how can i hyperlink(automatically) words within the definitions for which a definition also exists.
url structure is like this
www.site.com/glossary?word=someword
Then - in the definition of "someword" there is a word that also has a definition in the database. I'd like to auto hyperlink it to that definition. Also since the data is all coming from a database, what if one of the words to be replaced has not yet come up in the loop? (...or would it be okay since EVERYTHING should be in the recordset?
usually do perl and php. However, I would like to backup my databases with a microsoft sql server and sometimes a simple access database. In other words I would have a perl or php script that would insert data into a mysql database and at the same time post to a vbscript that will deal with the microsoft sql server or access database. I choose not to use perl or php to do the latter because I would like to keep every aspect according to its environment.
Almost every vbscript I've looked at is embedded in the html page. Since I intend to send via a post from a different type script - my question is can you place vbscript on the server as a stand alone? If this is possible - Where can I find references to this?