Create A Shell Object In ASP

I want to run batchfiles via the Shell, but accessible in the Browser via IIS. Actually, I'd like the server to start a command line ntbackup if a users selects to do so on an ASP in his webbrowser. Does anyone know how to create a shell object in an ASP?

View Replies


ADVERTISEMENT

WScript.Shell Object

I've made an ASP page that calls a small executable and collects its text output into a variable ("strExeOut") below. Below is some code similar to the one I use for that purpose.

strExe = "C:whatevermyprogram.exe -h1 -d33"

Set objShell = CreateObject("WScript.Shell")
Set objScriptExec = objShell.Exec(strExe)
strExeOut = objScriptExec.StdOut.ReadAll

I developed this in my own computer and the whole thing works like a charm, but
unfortunately I assumed my hosting provider would let me run the (little and harmless) exe, and they won't.

Therefore I have to run only the "exe" portion of the code in another web server and send back the output to my website on the net. I'd like to get some feedback on what would be the best way to call an exe on another server, and to have the output sent back.

View Replies View Related

VBscript IIS And WScript.Shell Object

can SO tell me why the following script :

dim oShell
set oShell=WScript.CreateObject("WScript.shell")
oShell.run ("C:WINNTsystem32cmd.exe /c C:WINNTsystem32
otepad.exe")
set oShell=nothing

works as expected in the context of a .vbs script and doesn't work (with the following changes made...) when inserted in a .asp web page under IIS ?

dim oShell
set oShell=Server.CreateObject("WScript.Shell")
'
intReturn = oShell.run ("C:WINNTsystem32cmd.exe /c C:WINNTsystem32
otepad.exe")
response.write(intReturn)
set oShell=nothing

the Shell object is well created (i can check some of its properties) but the oShell.run command doesn't seem to execute the given command line.

View Replies View Related

Server Object Wscript.Shell - Permission Denied

im using server object Wscript.Shell in an asp page to run a bat file, under C:inetpubwwwroot, and after i run the ASP page, it give me an error message that

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/wss1/bat.asp, line 22

im sure that Windows Scripting Host is running well in my pc. But it still giving me this problem.below is my coding of the asp pages. Code:

View Replies View Related

Create Object & DAO

how to create dao.tabledef object in asp:

I need to convert the following code into asp:
Dim tdf As DAO.TableDef
Dim db As DAO.Database
Dim fld As DAO.Field

Set db = OpenDatabase("C:Mydb.mdb")
Set tdf = db.TableDefs("Table1")
Set fld = tdf.CreateField("Field2", dbText, 10)
tdf.Fields.Append fld

View Replies View Related

Cannot Create Object

This may be more of an IIS issue, but I receive the following error when I first try to login to my ASP application... however if I just hit the refresh button on the page where the error is showing, it goes through just fine, until I recycle the application pool, then it does it again.

Server object error 'ASP 0178 : 80070005'

Server.CreateObject Access Error

/includes/default.inc, line 11

The call to Server.CreateObject failed while checking permissions. Access is denied to this object.

Anyone have any idea why this is happening... it couldn't really be a permissions issue could it, since it actually does work, just not the first time.

View Replies View Related

Can't Create Object

I receive this error when launching my .asp page. The .asp page works perfectly from the SQL server itself, but it does not work when I moved the code to the web server. The web server has an ODBC connection that tests "successful".I do not know .asp. I know .php.

View Replies View Related

Create XML Parser Object

I'm trying create an MSXML object so I can load an XML file into it and start to retrieve values from it. The msxml.dll is there and registered. When I try and run the code below either the object doesn't get created or it cannot load the XML file. And I just can't see why. Does anyone have any ideas.

<%
'Create an instance of MSXML to retrieve values from the XML file
set objXML = Server.CreateObject("microsoft.xmldom")

strPath = server.MapPath("books.xml")

'load the XML document that we want to add to the database
objXML.load(strPath)

'see if the object loaded OK
if objXML.parseError.errorCode <> 0 then
Response.Write "object could not open"
else
Response.Write "object opened fine"
end if

set objXML = nothing
%>

View Replies View Related

Create Object Error

I am getting the following error when using CDONTS to send an email.

Server object error 'ASP 0177 : 800401f3'

Server.CreateObject Failed

/submitauth.asp, line 42

800401f3

We have recently moved the application from a windows 2000 server to a windows 2003 server with DOT net framework installed. Everything else works but I am not able to send emails. Does anyone knows why this happens?

View Replies View Related

ActiveX Component Can't Create Object!

Originally Posted by Error

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'CDONTS.Newmail'

/mailer.asp, line 20

I am Getting that error once i submit on a Form.. Code:

View Replies View Related

ActiveX Component Can't Create Object

I am recieving error ActiveX component can't create object in the following
line in the asp page.

set ExcelApp = CreateObject("Excel.Application")

Previously this code was working fine.

View Replies View Related

Create.Object(SQLActions.Select)

I am trying to migrate some websites to IIS 6 and this code does not work in IIS apparently, at least I have not found a way to make it work after 10 business days of trying. In ASP is there another way to accomplish this that may be more suitable: Code:

View Replies View Related

Unable To Create Cdonts.newmail Object

I'm having a problem with cdonts.newmail. quite simply when i try to use the server.createobject method to create it it gives me an invalid progid error. it works fine on the test server so the problem is somewhere in the server settings and not with the code. both servers use win2k advanced server.

I'm not sure what information is relevent to this problem so if you need more information please just ask.

specifically I'm wondering if it's possible to dissable the object, preventing it to be created. if this can be done where would you do it?

View Replies View Related

ActiveX Component Can't Create Object: 'CDO.Message'

I get:

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'CDO.Message'

/wheelofgod/mailing.asp, line 3

How is that dealt with?

View Replies View Related

ActiveX Component Can't Create Object: 'CDO.message'

I run a script on my server I get a error
messeage..

Microsoft VBScript runtime error '800a01ad'

ActiveX component can't create object: 'CDO.message

View Replies View Related

Error: ActiveX Component Can't Create Object: 'CDO.Message'

does anyone knows how to send email from ASP forms?

I wrote this code for sending email:

Dim objMail
set objMail = CreateObject("CDO.Message")
objMail.From = "mail-srv@binapuri.com.my"
objMail.To = "Serene@binapuri.com.my"
objMail.Subject = "New leave application."
objMail.TextBody = "Testing"
objMail.Send
set objMail=nothing

But I got this error:

Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'CDO.Message'

What does it means?

View Replies View Related

ActiveX Component Can't Create Object: 'CDONTS.NewMail'

Does someone know the cause of this error? I'm developing a simple christian site for our church and it needs to have an email functionality. When I submit the form I receive this error. Can anyone give me some tips?

View Replies View Related

ActiveX Component Can't Create Object Error Number = 429

After server went down I got this error after submitting Membership form. (win2000, IIS 5.0, Access Database(mdb)
ActiveX component can't create object Error Number =429

View Replies View Related

ActiveX Can't Create Object:"Scripting.FileSystemObject

I'm at a complete loss on what is causing this error. ActiveX Can't create object:"Scripting.FileSystemObject when executing the code below. Every example I've looked at is pretty much identical except for the file names.

What I am ultimately trying to accomplish is when clicking on a link check to see if a file with today's date exists if so link to it. If not, link to a file with yesterday's date.

View Replies View Related

Error :: ActiveX Component Can't Create Object: 'ScriptUtils.ByteArray'

I need to upload large files.I had the Huge ASP upload installed.It came recommended here.

Using the sample script I get this error when uploading:

Error Type:
Microsoft VBScript runtime (0x800A01AD)
ActiveX component can't create object: 'ScriptUtils.ByteArray'
/upload.inc, line 53

What does that mean?

View Replies View Related

Shell Run MS Access

I'm trying to use vbscript to run a Macro in MSAccess via Wscript.Shell. So far, I have tried every variation on notation imaginable, and no luck. I can get MSACCESS.EXE to open, but it never runs the Macro, and never closes (which is the final command in the macro).

On the other hand, running the exact same command in DOS works great. Does everything it's supposed to perfectly. Code:

View Replies View Related

Shell Scripts

I need to run shell scripts from mozilla browser on unix side to start off tools. Giving direct link to it does not work in mozilla. Can i execute the shell scripts from ASP ? What other way is possible to start these shell scripts form mozilla browser on unix.

View Replies View Related

Shell.application

Does shell.application aplly/work with virtual directories or paths?

View Replies View Related

Access To Cmd Shell

We have need to run server based .vbs files and other OS commands through active server pages i.e

Set oShell = Server.CreateObject("WScript.Shell")
oShell.Run("c:somecmd.bat",,True)

Under Windows 2000 the EVERYONE group had read/execute rights against cmd.exe. Under 2003 this has been removed and in order to get my .asp file to execute the cmd shell I must grant the IUSR acct read/execute access to cmd.exe on the web server.

Is there a better approach or "best practice" to properly secure my web server and still be able to shell out to cmd.exe from asp?

View Replies View Related

Wscript.Shell

Currently, I move a application from win 2000 server to 2003 server, I use some vbs file in this application, however, it seems that those vbs file can not be run from 2003 server. Below is my code, can some one point out what did I do wrong here?

DIm objShell
Set objShell = Server.CreateObject("WScript.Shell")
objShell.Run(ExeName)
Set objShell = Nothing

View Replies View Related

Shell() Function

I've the next code:

Public Class WebForm1
Inherits System.Web.UI.Page
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Shell("C:Winntsystem32calc.exe", AppWinStyle.NormalFocus)

End Sub
End Class

The Shell() function isn't workin? does anybody know Why?

View Replies View Related

WScript.Shell Run Error

I am currently in the process of converting a website from an existing
web host to our servers. This website used the WScript.Shell command
to execute a series of Java commands that would send an encrypted
email.

I ran these commands directly on the server and they execute properly,
but when I try to run them from within the WScript.Shell command then
I get a return code of 1, and the actions that should be completed are
not.

The shell is executing a .bat file which is in the same directory the
text files it needs to run the following sample command(s): Code:

View Replies View Related

Wscript.Shell.run Returns 254

I am trying to run a command line from an ASP page. I am using windows 2003 with IIS6. I am able to get this to run on my local machine (Windows XP IIS5). Here is my code:

View Replies View Related

Wscript.shell Win2k

For win2k adv server/iis5.0 trying to run an external program from my asp routine that has multiple
parameters, see following.

set shell = server.createobject("wscript.shell")
shell.Run """f:phsDatahtmldochtmldoc.exe"" --webpage -f phsnew.pdf
phsnew.htm"

program either doesn't get invoked, or has an error, but since it has no error log i can't check that, so not sure why not getting a result i have run the program successfully from the command line in that directory, so know it can be run in the first place and the asp program creates and writes files in the same directory so i don't think its a permission problem. asp doesn't complain with any errors.

View Replies View Related

Wscript.Shell Run Program

I am trying to use the Run method of WScript.Shell to run a program that creates image files on the server. When I run the program through the command line it creates a text file and a bmp file which is what it is supposed to do.

If I run it from an asp page it doesnt do anything, it also doesnt give me any error messages. I can run the same vbscript code in a standalone vbs file on the server and it works right. Code:

View Replies View Related

Using WScript.Shell And The Run Command

I've been testing the WScript.Shell object and the Run command now for a server query. The file I am running generates a file with the server querys which i later on parse in my page. But there is a problem. When running the Run command om my Windows XP machine it all seems fine. But when trying to run it on my webserver (not configured by myself) I get an error, or the command fails. It's nothing wrong with the acctuall command but ASP seems to not want to allow the Run command.

First I though it had to do with user privilegies but after giving the IUSR_X full access it didn't help. So, does anybody know a solution for this? Exactly what do I have to configure, for what user, to make this work on my webserver (win2k).

View Replies View Related

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

Wscript.shell Error

Trying to view asp page which has the following code in
Set obj = WScript.CreateObject('WScript.Shell')

It falls over on this line saying 'Activex cannot create component (wscript.shell)'. Doing the same in a .vbs file results in the same error. The platform is NT4 Server Service Pack 6a.

View Replies View Related







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