Open current BES Client Log file - LogExpert - Windows
0 Votes |
Versioning - This is the latest version.
1 | Open current BES Client Log file - Windows | 6/9/2015 4:46:26 PM |
2 | Open current BES Client Log file - Windows | 6/9/2015 6:49:33 PM |
3 | Open current BES Client Log file - LogExpert - Windows | 6/10/2015 11:39:23 AM |
4 | Open current BES Client Log file - LogExpert - Windows | 6/11/2015 11:17:03 AM |
5 | Open current BES Client Log file - LogExpert - Windows | 6/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
6090 | |
Alpha - Code that was just developed | |
Open current BES Client Log file - LogExpert - Windows | |
BESC | |
Internal | |
6/9/2015 12:00:00 AM | |
jgstew on 6/22/2015 6:15:42 PM | |
jgstew on 6/22/2015 6:15:42 PM | |
10232 Views / 94 Downloads | |
* Average over 0 ratings. ** Log In or Register to add your rating. |
Relevance
Windows Only (Relevance 2997197)
/* Windows Only */ windows of operating system
/* Windows XP or Higher */ version of operating system >= "5.1"
Used in 4 fixlets | * Results in a true/false |
/* .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 |
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 |
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 |
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/Success Criteria
// 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"
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
Social Media: |