Executing Windows Commands Via ASP

Quick question: how can I execute Windows command (like deleting liles from
server) via ASP?

View Replies


ADVERTISEMENT

Executing Shell Commands In Asp

I'm trying to execute a Windows command in ASP. For example, this is a snippet of what I have right now:
....
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("notepad", 1, true)
Set WshShell = Nothing

The strange thing is that notepad.exe actually appears under the list of processes in Task Manager, but its window does not show up on the server's desktop; the client's browser just sort of hangs. I'm led to believe that this has something to do with IIS permissions, but I'm not certain.

View Replies View Related

Running SQL Commands Using ASP.Net

I have been trawling the net to find a decent example of a way to connect to an sql 2000 server using asp.net and run a few commands.

One of the commands i need to run is: "EXEC sp_addlogin 'Albert', 'B1r12-36', 'forum2'"

how to do this, and display a 'successful' message on the page if the command completed successfully.

View Replies View Related

System Commands

What is the syntax for running say. a batch file (.bat) from within ASP?

For example... in MS Access you can say something like this...
----------------------------------------------------------
CurrentDBDir = "c:"
ShellWait CurrentDBDir & "runthis.bat", vbNormalFocus
----------------------------------------------------------

This would run the "runthis.bat" file located in the c: directory. How would one accomplish this same thing in ASP?

View Replies View Related

ASP MS Word Commands

Is there a way to insert a word page break into an asp script? I have a script which uses the MS Word Document.ContentType to display a long table and I'd like to insert a page break at certain points so I can print it nicely.

View Replies View Related

Can Server Side Asp Run DOS Commands?

i have an asp page and id like to run some DOS commands to copy files around on the server to a new directory on the server, and then run an exe afterwards. some sites tell me its as simple as Code:

View Replies View Related

Printing DOS Commands From An ASP Page

I'm attempting to print to a Zebra printer (barcode) by taking the results of an .asp page and sending the output to the Zebra printer, which will interpret the output / embedded Zebra Program Language (ZPL).

Thus, printing the output at runtime. Does anyone know how to send a dos command from an .asp page that will send the .asp result output to a notepad file then send the notepad file to the printer at run-time? I tried the following code:

View Replies View Related

Server Intensive Commands

Can someone explain what kind of commands demand most attention/resources from server and how an internet server distributes its time among web programs/users. You can also refer me to certain pages where I can read through it.

As far as I know, people prefer using objrs.execute statement instead of other commands like .addnew or .edit etc. the problem is since I don't know much about this hardcore stuff of DB, I continuously have to ask people on ASPFREE to help me. although here people here are awesome but the problem is that sometimes it takes too much time so it's better to have first hand info in your head.

View Replies View Related

Run Commands Depending On Origin

Is there a way to tell an asp file which set of commands to run depending on what file they just came from?

View Replies View Related

Nested SQL SELECT Commands?

I have an ASP page where I build a html table dynamically by reading a database table and populating the <TD> cells with the fields of each record.

I want the last field to be a html drop down list that contains values read from another db relation in the same db. It would seem to me, (i'm novice) that this would require nesting SQL SELECT Code:

View Replies View Related

WScript.Shell To Execute Ms-DOS Commands?

How can I use WScript.Shell to execute Ms-DOS commands and can I see the
outputs commands in the asp page?

In the past, using Win. NT 4 Server and cmd..shell attribute to a variable I
could write the results in the screen page.

Any sample?

I couldnīt find any samples yet for win. 2000,ms-iii 5.0 and asp in my help
files, tutorials and guides, etc...

View Replies View Related

Executing .EXE

What is the preferred method of executing .bat or .exe via ASPs

View Replies View Related

Executing ASP

Is it possible to make an ASP script that continues to run after the browser window is closed? I have a script that is going to run continuously for multiple days, and don't want to leave the browser window open. Maybe this can be achieved by executing a command for the system to run it?

View Replies View Related

Executing A Command Using Asp

I am using the below command to restart a service on one of my web
boxes, this runs fine from the command prompt and also through a *.bat
file.

"Server1Applist$BOBJCentralMSpsservice.exe" Server2 -u
eutee-ww02pUsername -p password restart BOBJCentralMS

I found this asp code in this forum but can not get it to work with my
command

<%
Dim oShell, sCommand
sCommand = "MyCommand"
Set oShell = CreateObject("WScript.Shell")
oShell.Run sCommand, , True
Set oShell = Nothing
%>

I replace "MYCommand" with the command i wish to execute but the page
just hangs with the blue status bar halfway complete at the bottom,
when checking the services on the box it is not restarted.

View Replies View Related

Executing Query

If I execute the following:
Code:

qSQL3="insert into eli_encomenda_linha (eli_enc_codigo, eli_codigo, eli_pro_codigo, eli_pro_designacao, eli_quantidade, eli_preco_unitario, eli_desconto, eli_imposto, eli_emb_codigo, eli_men_codigo) values (" & codigoEncomenda & ", " & lCiclo & ", '" & Session("idProduto" & lCiclo) & "', '" & Session("Descr" & lCiclo) & "', " & Session("qtdProduto" & lCiclo) & ", " & Session("preco" & lCiclo) & ", " & Session("Desconto" & lCiclo) & ", " & imposto & ", " & embCodigo & ", " & menCodigo & ")"

oConn2.Execute(qSQL3)


Everything is OK but, if i put the same in an do while, loop then, the following error appears:

-2147217900 - [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement.

View Replies View Related

Executing VBS File From ASP

I've tried instantiating the Windows Script Host shell object in ASP,
and I'm trying to run this command: "cscript.exe myvbs.vbs parameter1
parameter2"; however, the server runs cscript.exe very briefly, and the
task ends. Note, it runs fine from a command prompt. Do I need to give
the anonymous user any special permissions in order to do this?

View Replies View Related

Getting The Results From Executing An Exe

Is there any sample about getting the results from executing an exe using
asp?

View Replies View Related

Executing ASP Page

I have a file called Audit.asp that I want to execute via command line from a batch file (bulk.bat)How can I do this?

View Replies View Related

Executing WSH Scripts

I have a WSH script that I usually run using the server scheduler but want to be able to execute it from an ASP page to generate reports spontaneously. The WSH Script performs correctly from the server system and the scheduler but when I try it from my ASP (please see below) nothing happens, no errors, no reports, no nothing.Code:

<%
Dim objWSH : Set objWSH = Server.CreateObject("WScript.Shell")

objWSH.Run("d:scriptsmailreport.vbs weekly")

Set objWSH = Nothing
%>

View Replies View Related

Executing An API Call

I have a VB DLL which I've created that I call from an ASP page I also created. The DLL makes a call to the API (FindWindow), but always returns 0 instead of an HWND. I'm guessing that IIS is designed to disallow its own processes from discerning any information about outside (non-IIS) processes (for security reasons).

i read into low, medium, and high "security" settings (ie. being created as an IIS process, pooled, or an outside process), but that didn't seem to help. Any suggestions as to how I can make this API call succeed (and/or any similar API calls?

View Replies View Related

Executing A Db Command

when i want to do an action to the database i am using the command

Set myConn = Server.CreateObject("ADODB.Connection")
myConn.Open = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" &
Server.MapPath("photoalbum.mdb") & ""
Set RS1 = myConn.Execute(SQL1)

is there something else i can use if it is only an INSERT statement in the sql because i dont actually need to create a recordset ?

View Replies View Related

Executing A VBS File

I used to be able to Execute '.VBS' files from ASP pages. I think the facility stopped in IIS6. Security feature I guess - any work arounds available ?

View Replies View Related

Executing C# Code

How do I execute an C# code from a website for my sql.

View Replies View Related

Executing A Dll In Asp Site

I have downloaded a Imager.dll for image resizing. This was working well in our local mechine but have problems in our server domain. Installation Instructions for Imager Resizer .Upload Imager.dll to any directory with "Scripts and Executables" permission on your webserver. but we can only set the below permission in our server domain (Read, Web, Browse, Write, Reset).

View Replies View Related

Executing .exe's On The Server

how to do it despite looking. Essentially I'd like to call a 'sed' script i wrote (using the executable 'sed.exe').

View Replies View Related

ASP Scripts Not Executing

I've got a computer with XP Pro and IIS 5.1 and can't get the vbscripts to run in my ASP pages. I set up a new virtual directory and turned all permissions on, on the virtual directory and the web site.

Example code :

View Replies View Related

Executing .exe Files On Client

How do I execute an executable (which will install some files) on the client machine which is stored on the web server. I've found this feature on many web sites.

View Replies View Related

Executing Stored Procedures

set rs = Server.CreateObject("ADODB.Recordset")
objConn.usp_RetrieveCategories rs

Method 2:

set rs = objConn.Execute("usp_RetriveCategories")

Which method is considered to efficient. Is it method 1 or method 2?.
The stored procedures returns no values.

View Replies View Related

Problem Executing Programs From ASP

I am trying to execute a ping command from ASP, and I am really not getting
anywhere. I wrote the following code based on what I found on the subject on
the Internet:

Dim sh, result
Set sh = CreateObject("WScript.Shell")
cmd = "ping 192.168.1.5 -n 1 -w 200"
result = sh.Run(cmd, 1, true)
Set sh = Nothing
Set result = Nothing

When I try loading the page containin this code, however, I get no response
from the web-server. And occasionally I get an error message saying that the
server could not handle the request due to too many users. Subsequent
requests to the server, also on other files, seems to end up in the HTTP
equivalent of a black hole, that is there is no response.

I am running WinXP (which is incidentally up-to-date with regard to Windows
Update) and IIS 5.1.

View Replies View Related

Executing A SQL Statement From An Asp Script

how to have multiple sql insert statements in one page. i have tried on my own and if i put more then one statement neither statement will work.

View Replies View Related

Executing SQL Views From An ASP Form

I am working on a very complex projet that has several SQL views and I want to execute the view so that the client can view the data from direferent angles. I need a sample code that I can use as a starting point.

View Replies View Related

Executing A Stored Proceedure

i have this script that loops through the variable in request.form("values") and based on this executes a Stored proceedure. Stored proceedure is in the include file. (Which basically does an insert) To make it neat
However, the loop is successful. But the SP only inserts into my db once.
What could be wrong here ?

Code:
<%aTest = Split(request.form("values"), ",")
For i = 0 to UBound(aTest)
%>
<!--#include file="../../../scripts/objects/send_sms.asp" -->
<%Next%>

View Replies View Related

Executing A Batch File From Asp?

We're trying to write an application that will allow a user to enter an id field from an ASP intranet page and when they hit the enter button, fire off a print job. The problem is, Adobe must be open as the items being printed are PDFs.

We tried firing off a print command using MS SQL cmdShell() (not sure if that is the exact name of the command) and it works, but it never completes. The process hangs in the database because, we think, it hasn't closed Adobe, therefore never coming back to the query. We wrote the query into an ASP page.

Adobe must be open or the documents won't print properly.

Does anyone have any suggestions to how we can automate this?

View Replies View Related







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