Professional Web Applications Themes

Cant run batch file from .asp under iis6 - ASP

what's in the BAT? -- ---------------------------------------------------------- Curt Christianson (Software_AT_Darkfalz.Com) Owner/Lead Designer, DF-Software [url]http://www.Darkfalz.com[/url] --------------------------------------------------------- ...Offering free scripts & code snippits for everyone... --------------------------------------------------------- "mike singer" <nospam_zookeeperwwwhr.com> wrote in message news:OD60u6hUDHA.2040TK2MSFTNGP11.phx.gbl... > This works fine from IIS5 but not from IIS6 > > miketest.asp calls miketest.bat > > I was getting permission denied until I opened up permissions on cmd.exe. > Now it runs w/ no error messages but the batch file does not execute. This > is just a sample put together to easily reproduce a problem. We have a real > live system impacted by this. Any help would ...

  1. #1

    Default Re: Cant run batch file from .asp under iis6

    what's in the BAT?

    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    [url]http://www.Darkfalz.com[/url]
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------

    "mike singer" <nospam_zookeeperwwwhr.com> wrote in message
    news:OD60u6hUDHA.2040TK2MSFTNGP11.phx.gbl...
    > This works fine from IIS5 but not from IIS6
    >
    > miketest.asp calls miketest.bat
    >
    > I was getting permission denied until I opened up permissions on cmd.exe.
    > Now it runs w/ no error messages but the batch file does not execute.
    This
    > is just a sample put together to easily reproduce a problem. We have a
    real
    > live system impacted by this. Any help would be appreciated.
    >
    >
    > <% language="vbscript" EnableSessionState=False %>
    > <%
    > Option Explicit
    > Response.Buffer = True
    > Response.Expires = 0
    >
    > %>
    > <HTML>
    > <TITLE>REWARD: Import Log</TITLE>
    > <%
    >
    > Dim oConn
    > Call Main
    >
    >
    > Sub Main
    >
    > CheckFiles()
    >
    > End Sub
    >
    >
    >
    > Sub CheckFiles()
    >
    > Dim oShell
    > Dim EXEPath
    > Dim cmd
    >
    >
    > EXEPath = "D:\test\miketest\"
    >
    > Set oShell = Server.CreateObject("WScript.Shell")
    > cmd = EXEPath & "miketest.BAT"
    > response.write (cmd)
    >
    > '
    > ' RUN!
    > '
    > oShell.Run(cmd)
    >
    >
    >
    > End Sub
    > %>
    >
    > </HTML>
    >
    >
    >

    Curt_C [MVP] Guest

  2. #2

    Default Re: Cant run batch file from .asp under iis6

    This is what I use
    [url]http://www.darkfalz.com/1100/[/url]


    --
    ----------------------------------------------------------
    Curt Christianson (Software_AT_Darkfalz.Com)
    Owner/Lead Designer, DF-Software
    [url]http://www.Darkfalz.com[/url]
    ---------------------------------------------------------
    ...Offering free scripts & code snippits for everyone...
    ---------------------------------------------------------

    "mike singer" <nospam_zookeeperwwwhr.com> wrote in message
    news:#tGTX4qUDHA.1872TK2MSFTNGP12.phx.gbl...
    > In the real world, I'm not sure. In my test, It just echos the time to a
    > text file so that I know whether it runs or not. If I call a fake name, I
    > get an error, so it definitely knows that it is executing the file, but it
    > doesn't really. I added a continual ping in the batch file and even put
    > ping in the folder and gave all rights, I watched in task manager to see
    if
    > ping ever loaded. It did not. No error messages, nothing, just doesn't
    > execute.
    >
    >
    >
    > "Curt_C [MVP]" <Software_AT_Darkfalz.com> wrote in message
    > news:eUhiX$iUDHA.3308tk2msftngp13.phx.gbl...
    > > what's in the BAT?
    > >
    > > --
    > > ----------------------------------------------------------
    > > Curt Christianson (Software_AT_Darkfalz.Com)
    > > Owner/Lead Designer, DF-Software
    > > [url]http://www.Darkfalz.com[/url]
    > > ---------------------------------------------------------
    > > ..Offering free scripts & code snippits for everyone...
    > > ---------------------------------------------------------
    > >
    > > "mike singer" <nospam_zookeeperwwwhr.com> wrote in message
    > > news:OD60u6hUDHA.2040TK2MSFTNGP11.phx.gbl...
    > > > This works fine from IIS5 but not from IIS6
    > > >
    > > > miketest.asp calls miketest.bat
    > > >
    > > > I was getting permission denied until I opened up permissions on
    > cmd.exe.
    > > > Now it runs w/ no error messages but the batch file does not execute.
    > > This
    > > > is just a sample put together to easily reproduce a problem. We have
    a
    > > real
    > > > live system impacted by this. Any help would be appreciated.
    > > >
    > > >
    > > > <% language="vbscript" EnableSessionState=False %>
    > > > <%
    > > > Option Explicit
    > > > Response.Buffer = True
    > > > Response.Expires = 0
    > > >
    > > > %>
    > > > <HTML>
    > > > <TITLE>REWARD: Import Log</TITLE>
    > > > <%
    > > >
    > > > Dim oConn
    > > > Call Main
    > > >
    > > >
    > > > Sub Main
    > > >
    > > > CheckFiles()
    > > >
    > > > End Sub
    > > >
    > > >
    > > >
    > > > Sub CheckFiles()
    > > >
    > > > Dim oShell
    > > > Dim EXEPath
    > > > Dim cmd
    > > >
    > > >
    > > > EXEPath = "D:\test\miketest\"
    > > >
    > > > Set oShell = Server.CreateObject("WScript.Shell")
    > > > cmd = EXEPath & "miketest.BAT"
    > > > response.write (cmd)
    > > >
    > > > '
    > > > ' RUN!
    > > > '
    > > > oShell.Run(cmd)
    > > >
    > > >
    > > >
    > > > End Sub
    > > > %>
    > > >
    > > > </HTML>
    > > >
    > > >
    > > >
    > >
    > >
    >
    >

    Curt_C [MVP] Guest

Similar Threads

  1. Reduce file size as a batch
    By katie_schumack@adobeforums.com in forum Adobe Acrobat Macintosh
    Replies: 2
    Last Post: August 29th, 07:18 PM
  2. TO run an Application from Batch file
    By viki in forum ASP.NET Security
    Replies: 4
    Last Post: October 27th, 04:56 PM
  3. scheduled batch file does not run
    By bill in forum Windows Server
    Replies: 3
    Last Post: June 30th, 10:08 AM
  4. How to run a batch file.
    By Mike John in forum ASP.NET General
    Replies: 1
    Last Post: July 23rd, 01:29 PM
  5. Login batch file
    By LHaag in forum Windows Networking
    Replies: 0
    Last Post: July 10th, 08:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139