Microsoft Vbscript Runtime Error '800a0046' Batch File
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 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 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 co
Web Platform Installer Get Help: Ask a Question in our Forums More Help Resources Blogs Forums Home IIS.NET Forums IIS 5 & IIS 6 Security I get "Microsoft VBScript runtime error '800a0046' Permission denied... I get "Microsoft VBScript runtime error '800a0046' Permission denied" when using wcript.shell [Answered]RSS 2 replies Last post Mar 29, 2012 05:02 AM by Dalong Zhang - MSFT ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email http://arstechnica.com/civis/viewtopic.php?t=553990 Shortcuts Active Threads Unanswered Threads Unresolved Threads Advanced Search Reply sconnie 2 Posts I get "Microsoft VBScript runtime error '800a0046' Permission denied" when using wcript.shell Mar 27, 2012 05:35 PM|sconnie|LINK I have added IUSR_machinename to have read/write/execute rights to the directory that contains the batch file, and the cmd.exe file itself, as https://forums.iis.net/t/prev/1188162 well as ftp.exe. my code is something like this: set wshell = CreateObject("WScript.Shell") wshell.run "C:\Batch\ftp_testimonials.bat" set wshell = nothing I have tried using procmon to see what it's failing on, but there are so many events that I can't figure out what to filter on. thanks Reply sconnie 2 Posts Re: I get "Microsoft VBScript runtime error '800a0046' Permission denied" when using wcript.shel... Mar 27, 2012 05:57 PM|sconnie|LINK I should add that we are running Small Business Server 2003 and this is not an internet facing web server. Reply Dalong Zhang... 641 Posts Re: I get "Microsoft VBScript runtime error '800a0046' Permission denied" when using wcript.shel... Mar 29, 2012 05:02 AM|Dalong Zhang - MSFT|LINK Hi, You can try setting application pool identity to LocalSystem. If this does not work for you, I suggest using Microsoft ProcMon to monitor IIS process w3wp.exe and look for "access d
Web Platform Installer Get Help: Ask a Question in our Forums More Help Resources Blogs Forums Home IIS.NET Forums IIS 5 https://forums.iis.net/t/1148515.aspx & IIS 6 Classic ASP WScript.Shell Microsoft VBScript runtime error '800a0046' https://bytes.com/topic/asp-classic/answers/53935-microsoft-vbscript-runtime-error-800a0046 WScript.Shell Microsoft VBScript runtime error '800a0046' [Answered]RSS 8 replies Last post Jun 20, 2008 02:20 PM by tomkmvp ‹ Previous Thread|Next Thread › Print Share Twitter Facebook Email Shortcuts Active Threads Unanswered Threads Unresolved Threads Advanced Search Reply asidana 20 Posts WScript.Shell Microsoft microsoft vbscript VBScript runtime error '800a0046' Mar 20, 2008 08:05 AM|asidana|LINK
Question Need help? Post your question and get tips & solutions from a community of 418,590 IT Pros & Developers. It's quick & easy. Microsoft VBScript runtime error '800a0046' P: n/a nicholas.gadacz hello all, i have a permission issue. my script works fine on my windows2000 server development box, however when i move it to my windows2003 production server it produces an error. any help would be great. script <% set oWS=server.createobject("WScript.shell") ret=oWS.Run("c:\bat\send_erp_test.bat", 0, true) 'line 19 if(ret=0) then message = "test_sent" else message = "not working
" end if %> error: Microsoft VBScript runtime error '800a0046' Permission denied /admin_rps/erp_send_test_sql.asp, line 19 Jul 19 '05 #1 Post Reply Share this Question 3 Replies P: n/a Manohar Kamath [MVP] I am guessing that, Windows 2003 permissions are tighter and hence the account your are running this ASP under, does not have permissions to execute the BAT file. Check in the security tab of file properties, what the IUSR account permissions are. -- Manohar Kamath Editor, .netBooks www.dotnetbooks.com "nicholas.gadacz"
" end if %> error: Microsoft VBScript runtime error '800a0046' Permission denied /admin_rps/erp_send_test_sql.asp, line 19 Jul 19 '05 #2 P: n/a nicholas.gadacz i am sure it is a permissions problem but i just don't know what. for the bat file. it is in c:\bat and IUSR has rights to the directory and that file. do i have to do anything in iis? in windows 2000 server i did not have to do anything, but my machine is pretty open because i am behind a firewall. any help would be great. there is some difference between 2000 and 2003 that i am missing. nicholas.gadacz -----Original Message-----I am guessing that, Windows 2003 permissions are tighter and hence theaccount your are running this ASP