Sign in to follow this  
Followers 0
DJones

fileopen

2 posts in this topic

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0