Open current BES Client Log file - LogExpert - Windows
Log In or Register to download the BES file, and more.

0 Votes

Versioning - This is the latest version.

1Open current BES Client Log file - Windows6/9/2015 4:46:26 PM
2Open current BES Client Log file - Windows6/9/2015 6:49:33 PM
3Open current BES Client Log file - LogExpert - Windows6/10/2015 11:39:23 AM
4Open current BES Client Log file - LogExpert - Windows6/11/2015 11:17:03 AM
5Open current BES Client Log file - LogExpert - Windows6/22/2015 6:15:42 PM

Description

This task will open the current BES Client Log file in LogExpert with highlighting. Requires .NET 3.5 to be installed.

This only worked for admin users for some reason, even when being run from a temp folder the current user can read, and when the current user has read access to the log files. Seems to be related to the runascurrentuser. (as tested on Windows 10)

 


Property Details

ID6090
StatusAlpha - Code that was just developed
TitleOpen current BES Client Log file - LogExpert - Windows
DomainBESC
SourceInternal
Source Release Date6/9/2015 12:00:00 AM
Added by on 6/22/2015 6:15:42 PM
Last Modified by on 6/22/2015 6:15:42 PM
Counters 6580 Views / 83 Downloads
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Windows Only (Relevance 2997197)
Used in 6452 fixlets and 32 analyses   * Results in a true/false
Show indented relevance
/* Windows Only */ windows of operating system
Used in 158 fixlets and 17 analyses   * Results in a true/false
Show indented relevance
/* Windows XP or Higher */ version of operating system >= "5.1"
Used in 6 fixlets   * Results in a true/false
Show indented relevance
1 = number of logged on users
Used in 4 fixlets   * Results in a true/false
Show indented relevance
/* .Net 3 is installed */ exists (it as version) whose(it = "3") of names of keys whose(name of it as string as lowercase contains "v") of keys "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP" of (x64 registries; x32 registries)
Used in 5 fixlets   * Results in a true/false
Show indented relevance
exists files whose(name of it as lowercase ends with ((current year as string) & (current month as two digits as string) & (current day_of_month as two digits as string) & ".log")) of folders "__Global\Logs" of data folders of client
Used in 4 fixlets   * Results in a true/false
Show indented relevance
exists (it as string) whose(it contains name of logged on users) of members of local groups "Administrators"
Used in 2 fixlets   * Results in a true/false
Show indented relevance
not exists running applications "LogExpert.exe"

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
// http://www.log-expert.de/
// https://logexpert.codeplex.com/documentation
// http://alternativeto.net/software/logexpert/
// https://logexpert.codeplex.com/discussions/445384
// https://logexpert.codeplex.com/discussions/361411

// Download
prefetch LogExpert.zip sha1:a4e966225a87f95c232f9d3f75dd9056cf68c0ba size:3679315 https://dl.dropboxusercontent.com/u/640753/LogExpert_1_5_5493.zip
prefetch BigFix_LogExpertSettings.dat sha1:52133981f83f9a1619a53e8059da838e7fa2d235 size:10036 https://dl.dropboxusercontent.com/u/640753/BigFix_LogExpertSettings_02.dat

prefetch unzip.exe sha1:e1652b058195db3f5f754b7ab430652ae04a50b8 size:167936 http://software.bigfix.com/download/redist/unzip-5.52.exe

//parameter "tempFolder" = "{pathname of folders "Temp" of windows folders}"
//parameter "tempFolder" = "{pathname of folders "AppData\Local\Temp" of folders (name of current user) of folders "C:\Users"}"
parameter "tempFolder" = "C:\ProgramData\Temp"

utility __Download\unzip.exe

folder delete "{parameter "tempFolder"}\LogExpert"

// TODO: get current user
// TODO: improve relevance to get current bes client log file

// TODO: copy LogExpert to current user's temp folder so it can be run by non-admin (not sure if this is an issue) folder "AppData\Local\Temp" of folder (name of current user) of folder "C:\Users"
waithidden __Download\unzip.exe -o "{pathname of client folder of current site}\__Download\LogExpert.zip" -d "{parameter "tempFolder"}"

copy __Download\BigFix_LogExpertSettings.dat "{parameter "tempFolder"}\LogExpert\BigFix_LogExpertSettings.dat"

// give read access to current bes client log file to all users (only needed if current user is not admin)
// http://ss64.com/nt/cacls.html
//dos cacls.exe "{pathname of files whose(name of it as lowercase ends with ((current year as string) & (current month as two digits as string) & (current day_of_month as two digits as string) & ".log")) of folders "__Global\Logs" of data folders of client}" /T /E /C /G Users:R
//dos cacls.exe "{pathname of parent folder of client}" /E /C /G Users:(CI)R

// Run LogExpert
// LogExpert.exe -config
// http://www-01.ibm.com/support/knowledgecenter/SS63NW_9.2.0/com.ibm.tivoli.tem.doc_9.2/Platform/Action/c_override.html
// https://forum.bigfix.com/t/newer-actionscript-commands/11677
override run
runas=currentuser
run "{parameter "tempFolder"}\LogExpert\LogExpert.exe" "{pathname of files whose(name of it as lowercase ends with ((current year as string) & (current month as two digits as string) & (current day_of_month as two digits as string) & ".log")) of folders "__Global\Logs" of data folders of client}" -config "{parameter "tempFolder"}\LogExpert\BigFix_LogExpertSettings.dat"
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!