Microsoft Vbscript Runtime Error 800a0046 Permission Denied Wscript Shell
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to debug ASP permission problems with WScript.Shell object? up vote 4 down vote favorite I have to run command line operation from some legacy ASP application. Here is my code: <% cmd = "%comspec% /c echo Hello" set wsh = CreateObject("WScript.Shell") ireturn = wsh.Run(cmd, 0, true) set wsh = nothing %> And here is result I am receiving: Microsoft VBScript runtime error '800a0046' Permission denied /test.asp, line 6 Do you have any idea how to make IIS6 to run this code? Note: Of course I don't have to run echo command but I want to exclude any additional causes of the problem. Update: I tried most things tomalaks mention however nothing helped. Maybe I can alter question a little. How can I debug this problem? security asp-classic vbscript iis-6 permissions share|improve this question edited Oct 22 '09 at 3:20 AnonJr 2,31411736 asked May 22 '09 at 10:47 Jakub Šturc 17.9k196996 add a comment| 1 Answer 1 active oldest votes up vote 4 down vote ASP usually is denied access to anything potentially dangerous, such as cmd.exe. Check file permissions on cmd.exe to see if that is true for you (I suppose it is). If you really must use cmd.exe to do part of the page processing, either change file permissions on cmd.exe (not recommended for a
Case and Cooling Fetish CPU & Motherboard Technologia Mobile Computing Outpost Networking Matrix Other Hardware Agora Classifieds Ars DIY Forum (Name TBD!) Operating Systems & Software Battlefront Microsoft OS & Software Colloquium Linux Kung Fu Windows Technical Mojo Distributed Computing Arcana Macintoshian Achaia Programmer's Symposium The Server Room Ars Lykaion Gaming, Extra Strength Caplets The Lounge The Soap Box The Boardroom http://stackoverflow.com/questions/897293/how-to-debug-asp-permission-problems-with-wscript-shell-object The Observatory Ars Help & Feedback Ars Subscription Member Areas Image Galleries Problems executing batch files with Wscript.Shell in ASP 9 posts TheDan666 Ars Tribunus Militum Registered: Jul 1, 2003Posts: 2359 Posted: Fri Apr 02, 2004 11:37 am Hey All,Having some problems kicking off a batch file from ASP. I'm running Windows 2003 Server standard http://arstechnica.com/civis/viewtopic.php?t=553990 edition with IIS 6 (although I was experiencing the same problem with Windows XP Pro). I'm trying to have ASP kick off a batch file that runs some robocopy commands. The batchfile itself works fine when I run it but here is the code just for the sake of it:sync1.bat c:\robocopy.exe d:\inetpub\wwwroot\wshellTest\dir1 d:\inetpub\wwwroot\wshellTest\dir2 /mir and here is my ASP code: If Request.Form("submit") = "sync" then set oWS=server.createobject("WScript.Shell") ret = oWs.Run("d:\Inetpub\wwwroot\wshellTest\batchFiles\sync1.bat", 0, false) if(ret=0) then response.write("it is working
") else response.write("not working
") end if set oWS = nothing End If When I run this I get the following error on the oWs.Run line: Microsoft VBScript runtime error '800a0046' Permission denied /wshellTest/syncme.asp, line 5 I've done everything I can think of in terms of permissions. In IIS, the directory I'm running this from has script and executables permissions. NTFS-wise, I have given the IUSR account full control of the entire directory and its contents. I've tried running even just regular DOS commands such as DIR and DATE and have gotten nothing. I've also tried ru
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive https://www.experts-exchange.com/questions/23668285/WScript-Shell-run-command-get-Microsoft-VBScript-runtime-error-'800a0046'-Permission-denied.html Real-Time Help Create a Freelance Project Hire for a Full Time https://www.experts-exchange.com/questions/21672776/permission-denied-Microsoft-VBScript-runtime-error-'800a0046'-using-WScript-Shell.html Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > WScript.Shell run command get Microsoft VBScript runtime error '800a0046' "Permission denied" Want to Advertise microsoft vbscript Here? Solved WScript.Shell run command get Microsoft VBScript runtime error '800a0046' "Permission denied" Posted on 2008-08-21 ASP 1 Verified Solution 5 Comments 8,461 Views Last Modified: 2008-12-25 I am getting the dreaded "Permission Denied" error from my classic ASP page, when trying to run an exe file using the shell run command. Here's the senerio: This microsoft vbscript runtime Works: Network user FRED on his desktop opens browser and goes to website on ServerA. ServerA runs a WScript.Shell run command on an Exe that does some stuff. This Does NOT work: (Same as above except, the website starts on a different server.) Network user FRED on his desktop opens browser and goes to website on ServerB. ServerB then does a response.redirect to a page on ServerA and that page runs same WScript.Shell run command on an Exe that does some stuff. However, this DOES work: (Same as above except different network user. JOE is an admin on ServerA.) Network user JOE on his desktop opens browser and goes to website on ServerB. ServerB then does a response.redirect to a page on ServerA and that page runs same WScript.Shell run command on an Exe that does some stuff. In all cases, same exe, same website runs the exe, just that the web browser started from another server and it behaves differently depending on the user
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > permission denied Microsoft VBScript runtime error '800a0046' using WScript.Shell Want to Advertise Here? Solved permission denied Microsoft VBScript runtime error '800a0046' using WScript.Shell Posted on 2005-12-21 ASP 1 Verified Solution 15 Comments 31,691 Views Last Modified: 2009-09-16 Hi all, I've got an issue with a script that uses the WScript.Shell. The problem is that I keep getting a permission denied error. I've set permissions on the folder, the file, and even "wscript.exe" file itself in the Windows\System32 folder to "everyone" with full permissions with the same results. I'm a bit baffled as to why I would still have a permissions issue. The script is running on IIS 6.0 on Windows 2003 Server Enterprise - it is set up as a domain controller, so the IWAM account was given full permissions as well. <% Set oShell = Server.CreateObject("WScript.Shell") RetCode = oShell.Run("C:\test\test.bat", 1, True) %> it crashes on the second line with " permission denied Microsoft VBScript runtime error '800a0046' " What other permissions are there to set up? I've done this in the past on IIS5 and earlier and all I had to do was set up the IUSR account with read & execute. With full permissions set to "Everyone" this should work (unless I'm missing some other setting besides the files, the folders, the objects and the website). Any ideas? 0 Question by:simplyamazing Facebook Twitter LinkedIn Google LVL 22 Best Solution byWMIF check out www.sysinternals.com they have a file monitoring program for free that will give you access denied reports. this may help us find the issue. Go to Solution 15 Comments LVL 22 Overall: Level 22 ASP 21 Message Expert Comment by:WMIF2005-12-21 iusr_machine and iwam_machine are not included in the everyone group. try explicitly naming those accounts to have permission. 0 Message Author Comment by:simplyamazing2005-12-21 OK, I did that on the script file, the batch file, the folder and wscript.exe Still no luck. Maybe wscript.exe is the wrong file I'm changing permissions on. (I made an assumption there). 0 LVL 22 Overall: Level 22 ASP 21 Message Expert Comment by:WMIF2005-12-21 is the batch file trying to write anything? if so, you will nee