How To Execute Command Line In ASP

Does anyone know how to execute command line in ASP?

View Replies


ADVERTISEMENT

Execute A DOS Command

with dos command of " ipconfig/all>c:ip.txt " I can retrieve some info and save it in a text file of ip.txt, now I am wondering if there is a way to do the same thing within asp?

View Replies View Related

Command LINE

Im trying to use teh command line, for now i just want to do something realllly basic like opening a txt file. and then later i can do some more advanced stuff, but for now i just want to know if i can use the command line, right now i just have Code:

<%
Dim oShell,sCommand
sCommand = "test.txt C:"
Set oShell = Server.CreateObject("Wscript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>

View Replies View Related

ASP Run Command Line

What is the proper syntax to run this command line in ASP?

wzzip.exe File.zip File.txt

View Replies View Related

Execute A Remote Command

I have a shell script that needs to be executed on a unix machine on our network and text output needs to be retrieved How can I make a asp.net page do it ?

is there a way to batch execute the command that I execute in the command prompt and just retrieve the outoput.

Here is what I am manually executing currently from the dos command prompt

Step 1. telnet <unixmachine>

Step 2. login <login name>

Step3. I Provide the password

Step4. once logged in to the machine I Provide the <shell script command>

The results of the script get displayed on my command window. I copy and paste the result

can the above be done through asp/asp.net page

View Replies View Related

Execute Command Lines

I need to be able to execute DOS command lines via ASP. This would include running an .exe along with passing commands/switches.The platform is Win2k/IIS.Is this easily accomplished with ASP?

View Replies View Related

Execute Command From A String

I am trying to make our website a bit more dynamic. one of the ways i want to do this is to be able to put in ASP code into our MySQL database (the code would be different for every company) and have it execute when the page is brought up.

We have the potential of having thousands of companies using our website, so having it hard coded will be hard to maintain, and having it save to a file will become cumbersome if there are too many users. Anyone have any ideas on how to execute a piece of ASP code straight from a string varaible?

View Replies View Related

IExplorer Command Line

I want to know IExplore.exe command line options, basically I want the command line equivalent of the following line:

Window.open(strUrl, winID, "toolbar=no, scrollbars=yes, location=no,
statusbar=no, menubar=no, personalbar=no resizable=yes, left = 50, top =
25");

View Replies View Related

Send Command Line

I'd like to send a variable generated in the script back to a batch file.
I can run the batch file by using objShell.Run(lock.bat filename). My
batch file lock.bat runs fine with the argument "filename", the
problem is that "filename" is actually a variable that is created in
the script and I want the value passed to the batch file, not the
label. Any ideas/sampe code

View Replies View Related

Command Line Execution

I have this command-line which I do execute it manually.I am curious if anyone can help to execute the command-line from an asp page using vb.

View Replies View Related

Command Line Queries

I am running a dynamic site using MySQL and ASP and wish to back up my MySQL DB on a daily or weekly basis to a remote server/MySQL DB. I know how to do this from the command line using MySQL:

mysqldump -u username -p password --databases myDatabase | mysql -u username -p password -h remote.server.com

But i need to be able to issue this command from within an ASP page. PHP has various methods for executing command line queries such as exec() & shell_exec() but I don't know any using ASP.

View Replies View Related

How To Execute A Command On Server Side

I would like to know how could I execute a
command/script on server side which is located in the same
directory as the asp ? And how could I response.write()
the result?

View Replies View Related

Executing A Command Line Applications...

Can someone give me some sample code on how one would go about executing a
command line "command" from within an ASP form?

We need to run an application called GnuPG which allows us to encrypt an
email.

Preferably some documentation directly on this would be good but any other
docuemtnation on executing a command line "command" would be great!

View Replies View Related

Server.execute Command Inside Global.asa

Question. Is it possible to run Server.execute command inside global.asa
file. if it is where. Inside Application onstart?

View Replies View Related

Checking For No. Of Rows Affected Using Command.Execute

DBMS: MS Access 2000
ADO Version: 2.8
IIS Version: 5.1

I'm trying to use the ADO's Command object, Execute method to execute a SQL Update Statement. I would like to ask how do I check for the no of rows affected by the SQL Update command.

View Replies View Related

ASP Code Passing Options To Command Line?

I need an ASP code that will pass some variables as options to a command line.

Let's say I need to execute a program with some options and I need the user
to select the otions from the web interface.

The command line will look something like this:

Program.exe /usename:username /password:password /options:option1,option2,option3

The the user will access a web page and it will be asked for the username , password and
it will be able to select the options by marking them on the page.

After the selection the command line will be executed with the selected oprions.

If somebody can point me to some example code or any hints to get me started I would
appreciated it.

It is possible to specify also the credentials the "program.exe" should run under?

View Replies View Related

Server.Execute Command Disables Body OnLoad

i have this web page which on loading shows + hides a selection of div's using the command : Code:

<body onLoad="showHide()">

i wanted to include a standard banner by adding the command : Code:

<%
Session("titleString") = "some title"
Server.Execute "index.asp"
%>

but this seems to disable the onLoad command, presumably because there is already a full header and body in the "index.asp" file

the reason why i didn't use the "include file" command here was because the latter won't allow the title string to be fed through

the question is : is there an alternative way to execute either the "Server.Execute" or the "body onLoad" command that will allow the function showHide() to work ?

the same function is also called from a "select" form element Code:

<select onChange="showHide()">

and that works fine, so the problem definitely lies with the onLoad command, not the showHide() function.

View Replies View Related

Winzip Command Line Utility Wzzip.eze Problem

I am using command line utility of wzzip.exe in asp and vb script. When I try to use wzzip in asp, it sometimes works fine and sometime hangs. It doesn't give any error.

The server that the process is running on, if I logoff from that server, wzzip.exe hangs, however when I just "disconnect" from the server, it runs fine. This happens when I try to use wzzip.exe from my user interface. The code to invoke the shell is in a dll which resides in MTS. I am using the following wzzip command in asp.

cmd.exe/c "c:Program fileswinzipwzzip.exe -a
servernamefolderfilename.zip servernamefolderfolder_to_be_zipped

When I run it manually command line, there are no problems.

I have a similar job which I have in vbscript, that job runs without any
issues.

View Replies View Related

Error - 2147217908 Command Text Was Not Set For The Command Object

I am getting the above error when trying to execute the following code:

View Replies View Related

Read Cell Data Line By Line From Excel

I had created a macro to read data from an excel sheet and write the values to a text file. I had used "ActiveSheet.Range("GB" & k).Value" command to read the values from the excel.some cells in the excel sheet is having two lines value and four lines data, the text file is generating that value in a single line. (Ex. the cell value in address column is in four lines and should display in four lines in the text file generated from the macro)

Can i do something in the excel sheet or in vb script to read the address value line by line and write line by line in text file?

View Replies View Related

Command Text Not Set Command Object

I have an online application. I get the following error when a user selects an option from one drop down list but doesn't select an option from another drop down list. Here is the error:

Microsoft OLE DB Provider for SQL Server error '80040e0c' Command Text was not set for the command object. Code:

View Replies View Related

Command Text Was Not Set For The Command Object

I have an online application. I get the following error when a user selects an option from one drop down list but doesn't select an option from another drop down list. Here is the error:

Microsoft OLE DB Provider for SQL Server error '80040e0c'
Command Text was not set for the command object.

Line 87
Line 87 = rs1 = conn.execute(finalSQL)

Here is the page causing the error. Code:

View Replies View Related

Command Text Was Not Set For Command Object

I keep getting this error. I searched the forums, and found one. It said to basically replace elseif with else. It worked for that person.

I tried it and it didn't work. So what i decided to do was, remove all of the if statements and keep one. Even with just one if statement i get the same problem. Does anybody know what is wrong? It worked fine, up until i added the if statement. I need them there though for a reason.

Personally i think, it;s not getting the value from the request form, and hense it isn't picking anything up. What do you lot reckon? Code:

View Replies View Related

Read Txt File Line By Line

I have an encrypted .txt file created by asp. Its formatted with lines etc. Title followed by description underneath. I need to read this into ASP now, and parse it line by line. On each line read, run the function to unencrpt and add line to a new file.

Its the line by line Im having trouble with. If i do the full textstream no formatting takes place coz im adding the fulltextstream all in one addline call. How can I loop through lines ?

View Replies View Related

Error In Asp Text: Command Text Not Set For The Command

I am getting the above error in an asp page. Not sure why? The error details is given below. Code:

View Replies View Related

Like Command

I have a form that uses the POST method to call up test.asp and it
passes what is typed into the text box. Since is uses the Like command
the user can enter stuff like %Constant% to get something that is like
what the user typed in. When I call up the test.asp page it is grabbing
the text fine but isn't running the SQL command the correct way. The
SQL command ends up being:

SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')

Here is my code


strName = Request.Form("Search")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "PhoneList"
sSQL = "SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')"
Set Rs = Conn.Execute(sSQL)

View Replies View Related

New Command

Given a class called Foo, I can do:

Set f = New Foo

But is there a way to instantiate a class and pass a parameter into it as well, such as:

Set f = New Foo("joe")

If so, then how does class Foo look like to accept such a parameter?

View Replies View Related

CLI Command

How can I run a CLI command from asp page?
Please guide me.I have hard coded the variables. I need drections and see if my method is right.

Dim shell
Set shell = CreateObject("WScript.Shell")
shell.Run((im editissue --field= "state = verified" --field = "user = abc" 15947)
Set shell = Nothing

View Replies View Related

Command

does any body have a command that enables you to talk to another computer on a network
like A instant message.

View Replies View Related

Run A DOS Command From ASP

How can I run a DOS command from my ASP ?(prefer to use html/vbscript solution rather than 3rd party add-ons)

View Replies View Related

Command

I am using DW to create this ASP page and I need to do a simple calculation that will result in a cell being 10% of the previous cell. I am using this statement:

<%=(rsReferingAgent.Fields.Item("ReferingAmount").Value * .1)%>

Now, all I need to know is how to get it to only display two decimal places instead of multiple decimal places.I need the result to look like this:

$1,234.45

and not:

1234.4573

View Replies View Related

SQL Command

I would like to use the sql command to query the database from ASP. But it keep showing me the error. Select location from the table tapeinfo. The location must start with "Data". Here is the command?

'sqlStrl="SELECT * FROM tapeinfo WHERE location like ' "&Data&"% ' "

Anyone can help me to verify whether it is correct?

View Replies View Related

Using The Like Command In SQL

I have a form that uses the POST method to call up test.asp and it passes what is typed into the text box. Since is uses the Like command the user can enter stuff like %Constant% to get something that is like what the user typed in. When I call up the test.asp page it is grabbing the text fine but isn't running the SQL command the correct way. The SQL command ends up being

SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')

Here is my code

strName = Request.Form("Search")
Set Conn = Server.CreateObject("ADODB.Connection")
Set Rs = Server.CreateObject("ADODB.RecordSet")
Conn.Open "PhoneList"
sSQL = "SELECT * FROM [Everyone] WHERE (Name LIKE ':: & strName & ::')"
Set Rs = Conn.Execute(sSQL)

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved