Cant run batch file from .asp under iis6

Ask a Question related to ASP, Design and Development.

  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_zookeeper@wwwhr.com> wrote in message
    news:OD60u6hUDHA.2040@TK2MSFTNGP11.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. Similar Questions and Discussions

    1. TO run an Application from Batch file
      Hi, I want to run the batch file from the asp.net web(intranet)application. The batch files works fine if it has some copy or del command,...
    2. scheduled batch file does not run
      I am running a batch file that basically uses xcopy to copy files to a network share. I have scheduled it to run under the domain administrator...
    3. batch file will not run under scheduler service
      I am trying to use a batch file to copy some files from a hard drive to a network drive. The batch file name is hrback.cmd. The network drive is...
    4. How to run a batch file.
      I want to run a batch file located on my c drive file: C:\mybatchfile.bat sincerely yours Mike John
    5. Login batch file
      We run a NT4 server with our workstations running Win98. We have a batch file that runs a log on script when each user logs into the network. The...
  3. #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_zookeeper@wwwhr.com> wrote in message
    news:#tGTX4qUDHA.1872@TK2MSFTNGP12.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.3308@tk2msftngp13.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_zookeeper@wwwhr.com> wrote in message
    > > news:OD60u6hUDHA.2040@TK2MSFTNGP11.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

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