Ask a Question related to ASP, Design and Development.

  1. #1

    Default Re: WScript.Shell

    It's most likely some sort of a permissions issue. The file is created and
    written to okay? What are you running in the batch file? Are you running
    dns.exe? Try temporarily adding server\iusr_servername to the local admin
    group on the server to see if that makes a difference, or since this is
    probably on a DC, you could try adding IUSR to the DNSAdmins group.

    Also, add a line like:

    net send yourcomputername Hi. The batch is running.

    to your batch file, so you'll at least know if the batch is being executed.

    Another thing you can try if it's a permissions issue is to use the runas
    service in your batch. Actually, if IIRC, you cannot pre-enter a password
    using runas. You'd have to use su.exe from the W2K Resource Kit.

    Ray at home

    --
    Will trade ASP help for SQL Server help


    "Cory" <cory@agency-online.com> wrote in message
    news:eHJn4WLUDHA.2220@TK2MSFTNGP11.phx.gbl...
    > I'm running this .bat file I create using the below ASP code to automate
    my
    > DNS.
    >
    > Set FSO = CreateObject("Scripting.FileSystemObject")
    > Set FSOF = FSODNS.CreateTextFile ("c:\root\dns\dodns1.bat", True)
    > FSOF.WriteLine("whatever")
    > FSOF.Close
    > Set FSO= Nothing
    >
    > I just intalled Windows Script Host 5.6 and hope it is enabled.
    >
    > set wshell = server.createobject("WScript.Shell")
    > wshell.run "c:\root\dns\dodns1.bat"
    > set wshell = nothing
    >
    > The file is not running. Any ideas?
    >
    > Thanks,
    > Cory
    >
    >
    >
    >
    >

    Ray at Guest

  2. Similar Questions and Discussions

    1. WScript.Shell is not working after windows update
      Group: I am using a method "Run" of the control "WScript.Shell" to execute a third party tool which converts TIFF to PDF. This was working fine...
    2. Calling Acrobat file from WScript.Shell ActiveX object
      WinXP, Acrobat 6 When I type the name of a PDF file at the Windows command prompt, the file opens properly. Then I create the following JavaScript...
    3. WScript.Shell to execute Ms-DOS commands?
      Good morning everybody, How can I use WScript.Shell to execute Ms-DOS commands and can I see the outputs commands in the asp page? In the...
    4. server.createObject("wscript.shell") ... wShell.run ... stopped working...
      I used to be able to run the following ASP code on our corp machine (W2K Server Edition and IIS-5) and successfully send a net-msg to anyone on our...
    5. Error:: Activex componet can not create object:"WScript.Shell"
      I am trying to use the shell object to send keys to the explorer browser to run the send page funcion. I am receiving the above error only when I...
  3. #2

    Default Re: WScript.Shell

    Permissions issue probably. If you are using "anonymous access" then the ASP
    page is being run under the IUSR_<machinename> account, which may not have
    admin priveleges.

    Deny "anonymous access", and authenticate using your Windows credentials -
    then the ASP page should run under the same user account that you are using
    when you "double click" on the batch file in Explorer.

    Also, make sure that your batch file isn't expecting any user input! :-)

    Cheers
    Ken

    "Cory" <cory@agency-online.com> wrote in message
    news:eHJn4WLUDHA.2220@TK2MSFTNGP11.phx.gbl...
    : I'm running this .bat file I create using the below ASP code to automate
    my
    : DNS.
    :
    : Set FSO = CreateObject("Scripting.FileSystemObject")
    : Set FSOF = FSODNS.CreateTextFile ("c:\root\dns\dodns1.bat", True)
    : FSOF.WriteLine("whatever")
    : FSOF.Close
    : Set FSO= Nothing
    :
    : I just intalled Windows Script Host 5.6 and hope it is enabled.
    :
    : set wshell = server.createobject("WScript.Shell")
    : wshell.run "c:\root\dns\dodns1.bat"
    : set wshell = nothing
    :
    : The file is not running. Any ideas?
    :
    : Thanks,
    : Cory
    :
    :
    :
    :
    :


    Ken Schaefer 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