Jump to content
Sign in to follow this  
DJones

fileopen

Recommended Posts

DJones

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.