Visualizzazione dei risultati da 1 a 2 su 2
  1. #1

    WScript.Shell iis6 e iis5

    Salve a tutti,
    su iis5 utilizzavo una classe con Wscript.Shell poer lanciare un eseguibile:

    codice:
    % Class cTxrxsys
    Public WScript
    Public Output
    Public hasError

    Private Fso
    Private pLogFile
    Private pBarCodeFile
    Private pPath
    Private pParams

    Private Sub Class_Initialize()
    Set WScript = Server.CreateObject("WScript.Shell")
    End Sub

    Public Property Let Params(Value)
    pParams = Value
    End Property

    Public Property Let Path(Value)
    pPath = Server.MapPath(Value) & "\"
    End Property

    Public Property Let LogFile(Value)
    pLogFile = Server.MapPath(Value)
    End Property

    Public Property Let BarCodeFile(Value)
    pBarCodeFile = Server.MapPath(Value)
    End Property

    Function IIF(cond,cTrue,cFalse)
    If cond then
    IIF = cTrue
    else
    IIF = cFalse
    End If
    End Function

    Public Sub PrintError(Description,CommandLine)
    Response.Write "<p style='font-family:verdana;font-size:11px'>"
    Response.Write "Shell Error
    "& Description
    If CommandLine<>"" then Response.Write "
    CommandLine : " & commandLine
    Response.Write "</p>"
    Response.End
    End Sub

    Private Function Execute(commandLine)
    Dim oExec
    on error resume next
    Set oExec = WScript.Exec(commandLine)
    If Err.number <> 0 then
    Response.Write("<p style='font-family:verdana;font-size:11px'>Shell Error
    "& Err.Description & "
    CommandLine : " & commandLine)
    Response.End
    end if
    on error goto 0
    hasError = False
    Output = oExec.StdOut.ReadAll()
    if Output="" then
    Output = oExec.StdErr.ReadAll()
    hasError = True
    End If
    Execute = hasError
    End Function

    Public Function Run()
    Run = Execute(pPath & "txrxsys.exe" &_
    IIF(pParams<>""," " & pParams,"") &_
    " " & pBarCodeFile &_
    " " & pLogFile)
    End Function

    Private Sub Class_Terminate()
    Set WScript = nothing
    Set Fso = Nothing
    End Sub

    End Class

    %>


    ora con iis 6 non funziona lo script va in time-out, credo sia un problema di protezione
    i
    n iis 5 avevo risolto con
    Autorizzazioni:script ed eseguibili
    protezione:Bassa

    in IIS6 per la protezione va creata una application pool apposta?

    help me please...
    http://www.raffygio.com

  2. #2
    risolto basta creare una nuova pool applicazione dall'amministrazione iis6 e dare i diritti di esecuzione come sistema locale....
    http://www.raffygio.com

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.