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


ADVERTISEMENT

Access Denied To Wscript.shell

I need to use nslookup on an asp page. So I use the sort of code I can see
in the discussion group:

SET objShell = Server.CreateObject("Wscript.Shell")
DIM objExec
SET objExec = objShell.Exec("%comspec% /c nslookup -type=MX "&host)

but I get "access denied" on the SET statement. (It doesn't matter what
command I am using in the shell.)

On the physical IIS application directory Web sharing is enabled
I enable anonymous access
I have full control for the internet guest account.
I have permission for scripts and executables on the virtual directory
application protection low
read write directory browse

I have enabled web sharing for windowsSystem32. (I probably shouldn't have!)

Clearly there is something I have forgotten. But what?

View Replies View Related

WScript.Shell And ASP, Permission Problem On IIS 5

When I call the WScript.Shell and "RUN" the object...

I've got nothing on the server

For Example,

objWscript.Run "notepad.exe", True, 1

But on the server side, there is no this process running..

The NTFS of notepad.exe permission is set to EVERYONE already..
While the IIS is running under the account of IUSR_XXXX

Is there any something wrong in the permission settings?

However, I run the same script on Windows 2003 Server, it is ok....

View Replies View Related

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

ActiveXObject Problem - WScript.Shell On Windows 2003 Server

I have installed MSDE on my local computer - Windows 2000 Professional. I have created a function which runs me a link whose path is placed in the input field. This function looks like this: Code:

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

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

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

Wscript.shell To Open File

I have a big problem with some part of my code, where I'm using the wscript.shell method to open a file...

I've tried this:

dim shell
set shell= createobject("wscript.shell")
shell.run "C:Clip_CreatorTVSA02.bat"
set shell=nothing

and this

Function fnShellExecuteVB()
dim objShell
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "C:WINNT
otepad.exe", "", "", "open",1
set objShell = nothing
End Function

I don't get any error but the application doesn't starts, I've also tried executing the notepad.exe and occurrs the same, nothing happens, I don't get error but the notepad doesnt lunch...

I'm getting tired about this code, I've tried a lot of kinds of scripts but I got the same result...

View Replies View Related

How To Use WScript.Shell Properly From An ASP Page?

I have a process that creates a whole bunch of files in a specified directory. The names of the files are the employee IDs with an .txt extension, so they are like

EMP001.txt
EMP002.txt
EMP003.txt

The background is a bit more complicated so I won't bore you with it, but I hope that I can add a button on the asp page that would

1) go to that specified directory, which is database-driven by the department id, such as

D:DepartmentDEPT001

and I'll be able to figure the directory path from the existing code

2) then loop through each employee id and append the employee name, so the above will become

EMP001JohnDoe.txt
EMP002MaryJane.txt
EMP003PeterKay.txt

The employee names are also database driven and my asp page will be able to provide the information.

What I would like is to have a button that would open the cmd.exe and make the appropriate changes, and then do the rename, and then close the cmd window.

I know that you can have something like: 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

Running Batch File Using WScript.shell Not Working

i used following code:

<%
set wshell = server.createobject("WScript.shell")
wshell.run "E:aaa.bat"
set wshell = nothing
response.write("worked")
%>

It does not show any error message and gives the output "worked"

I have installed .dll files for wsscript

Is there any other way to call batch file from aan asp page .

View Replies View Related

Permission Denied

I'm getting permission denied when I try to create a new folder. I gave the everyone group write permissions to the folder and I still get permission denied.
Here is my code:

View Replies View Related

'Permission Denied'

I have an ASP script which does numerous writes via FSO using ...

Function LogActivity(strText)
Dim fso, f
Dim strTime
strTime = ABCNOW()
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile((ABC_OS_ROOT_PATH & "ABCMAINLOG.txt"), 8,
True)
f.WriteLine strTime & " " & strText
f.close
End Function

.... We have recently tripled the number of users using the app have
found that IIS is intermittently reporting 'Permission Denied' while
writing to the log. You can try again a moment later and all will be
well. Has anyone seen this ? It seems very strange that W2K can't deal
with multiple processes/threads writing to the same file without
getting itself confused

View Replies View Related

Permission Denied

I am running a web application on a Win 2003 Std (Active Directory).
Everything works fine. I have installed same application on another
server Win 2003 R2 Std (No Active Directory). On that server I get
“Permission denied” using the following code (used to zip folder
content).

set WshShell = server.createobject("wscript.shell")
strZipIt = "wzzip -a " & ZIPFILE_PATH & " " & FOLDER_TO_ZIP & "*.*"
WshShell.run strZipIt, 0, true

If I run web application under Administrator account it works fine. I
have also tried to change from Winzip command to run a simple bat-
file. Still permission denied.

I have added read & execution rights to for instance IUSR_Machine,
IWAM_Machine on cmd.exe, wscript.exe, cscript.exe. Still permission
denied. Code:

View Replies View Related

Permission Denied

I get problems using scripting.FileSystemObject.I am writing an application that should do the following: A user must be able to upload files and create folders on the server as well as delete them. At the moment the user can create folders, upload files and delete files without any problems.
The problem is the following: If I try to delete a folder I get the 'permission denied error'. I thougt the problem was with permission settings on the server itself, but it doesn't seem to be the problem especially since I can delete the files but not the folders they are in. I then tried to delete the folders manually on the server, but I get the "sharing violation" error. Soon as the application is run the folders become undeletable. How do I "close" the folders making it possible to delete them from my server???
It doesn't matter if I run the other scripts on the buttons. If I create a folder manually on the server and run this page, the folder can not be deleted(client- or sever side)

View Replies View Related

Permission Denied

The following line

Set UserObj = GetObject("WinNT://" & replace(request.servervariables("REMOTE_USER"),"","/"))

was working on Windows 2003. I moved the code to a different computer, same Windows 2003, but now I'm getting

Microsoft VBScript runtime error '800a0046'

"Permission denied: 'GetObject'" error.

What needs to be done to fix the problem?

The page is under "Integrated Windows Authentication" security.

View Replies View Related

Permission Denied

I found this calendar script.
http://www.planet-source-code.com/v...&txtCodeId=6178 - see the attachement

This is what I need for my project. I try to Submit the new event from the admin.asp page, but I got this error message: Permission denied
/event/admin.asp, line 19


Which is at this line:

'open the text file

Set FileOut = FileObject.opentextfile(FilePath, 8, true )

View Replies View Related

Permission Denied

I have a web server running Windows NT and IIS 4.0. My
users that are using Windows 98 2nd edition have no
problem uploading their files into the server via ASP but
those users that are using Windows 2000 Professional will
have the below error :

Microsoft VBScript runtime error '800a0046'

Permission Denied

/project/maintain/result.asp, line 91

I have tried quite a lot of suggestion on the folder
permission but to no avail.Please let me know what I should do to solve this problem.

View Replies View Related

Permission Denied

Microsoft VBScript runtime error '800a0046'Permission denied

for line
'set writedata = fso.OpenTextFile(file_to_open3, 8, True)'.
this line should be correct right?? can anyone tell me why??

mapPathName="/Data/"
localdir =server.MapPath(mapPathName)
file_to_open3 = localdir & "" & serial_no &".txt"

Set fso = CreateObject("Scripting.FileSystemObject")

set writedata = fso.OpenTextFile(file_to_open3, 8, True)

View Replies View Related

Permission Denied

when i upload my excel file to server got msg that permission denied ,Microsoft VBScript runtime (0x800A0046) line no 121 and that line is Set oFile = oFS.CreateTextFile(sPath & FileName,8, True)I have checked the properties of the folder for the anonymous user the access is full.

View Replies View Related

Permission Denied

i got an asp page that allow me to upload file into server,i try to test it under wwwroot its working fine i upload file using my asp page into my own pc derectory.

when using the same way to upload my file into another pc using LAN by just change the file destination path and i get permission denied error messages.What will be the error i done to create this error messages?thx a million

when i upload file into my own pc i using this bariable,

DestinationPath = server.mappath("/files/")

when i upload file into other pc using this variable also,

DestinationPath = "123.123.1.1"+"/files"

then the error message come out,i did set the file permission of write and read to full control to everyone on PC that IP address 123.123.1.1

View Replies View Related

Permission Denied

I am getting "Microsoft VBScript runtime (0x800A0046) Permission denied" error at Code:

set file = fs.OpenTextFile(fileName, openMethod, true)
I have given permission IUSR_<computername> user to read/modify the directory by adding it to the security tab. I have even given permission to Everyone but still I am getting the same error.

View Replies View Related

Permission Denied

I am struggling to create a file using FileSystemObject on my os. (Win Xp pro) I know my code is working because when I upload to the server it works.

I have done the obvious by setting permission to the IUSR_Computer name and Disabled My Anti-virus App. Also Right clicked on the folder and web shared it. But there is one thing that is odd. When I de-select the "Read Only" checkbox and Click Apply and go the the properties again the Read Only is Selected again? I thought it might be the System Restore but it wasn't that.... anyone know what it could be .

View Replies View Related

Permission Denied

I am using Server.createobject("Adodb.connection") on a local server, when i am doing this from my machine its ok but when i try it from other machine it gives the error that permission denied server.createobject, I am not getting through exactly , what happening ,

The problem,,, is

when i use http:localhost est est.asp it runs
but when i try from other machine
http:abc est est.asp
then error , abc is my machine name

View Replies View Related

Permission Denied

With my script ASP, I display list of folders and files in a directory. My problem is :
when the directory is protected, I have a message an error page with "permission denied" message when my ASP script try to read its content. How can i read the content ? Or How Can I get permission ?

View Replies View Related

Permission Denied

I have created a dll to read the mails from inbox folder and to send the mail-using outlook. Code:

View Replies View Related

Permission Denied

i'm trying to put some verification onto some pages so that a msgbox pops up to say "added" or "removed" etc etc when i submit a form, but when i use the msgbox code i get a "permission denied" error

do i need a .inc file to use the msgbox code or something?

also tried it with <script language="vbscript"> and got the following error:

Expected statement
/Remove Patient2.asp, line 25
<script language="vbscript">

it doesn't matter which page i use the msgbox code on, i always get the permission denied error! and the expected statement error when i use the <script....> code.

View Replies View Related







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