Jump to content

fileopen


DJones
 Share

Recommended Posts

The script below is not opening the file in write mode...

; Logging centrally

$enablecentrallogging = iniread ( @scriptdir & "\" & $ssoclientupdateinifile, "InstallSettings", "EnableCentralLogging", "No" )

if $enablecentrallogging = "yes" then

$centralloggingpath = iniread ( @scriptdir & "\" & $ssoclientupdateinifile, "InstallSettings", "CentralLoggingPath", "" )

; Log the event on failure

if not fileexists ( $centralloggingpath & "\LogFailed\ClientFailed.log") then

dircreate ( $centralloggingpath & "\LogFailed" )

endif

$centtrallogfile = FileOpen( $centralloggingpath & "\LogFailed\ClientFailed.log", 1)

; Check if file opened for writing OK

If $centrallogfile <> -1 Then

FileWriteLine ( $centrallogfile, "Update failed on: " & @computername & "," & @username & "," & $updatessoversion & "," & @MON & "\" & @MDAY & "\" & @YEAR)

FileClose($centrallogfile)

EndIf

endif

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...