Remove files under AppData that my app has downloaded in Install4J - install4j

I have an Install4J project where the application installed downloads content to:
${installer:sys.userHome}\MyApplication
The installer does not copy any files to this location, so it is not part of any file sets etc.
I have tried to add an action in the uninstaller using "Delete files and directories", and copied "${installer:sys.userHome}\MyApplication" to "Files and directories"
However, it doesn't seem to delete the folder.
Any pointers on what I am missing?
Edit:
Here is the uninstall log regarding the delete action:
I found this in the uninstall log regarding the delete action:
[INFO] com.install4j.runtime.beans.screens.StartupScreen [ID 23]: command: move 1 screens, executing actions, checking condition
[INFO] com.install4j.runtime.beans.screens.UninstallWelcomeScreen [ID 24]: Show screen
[INFO] com.install4j.runtime.beans.screens.UninstallWelcomeScreen [ID 24]: command: move 1 screens, executing actions, checking condition
[INFO] com.install4j.runtime.beans.screens.UninstallationScreen [ID 27]: Show screen
[INFO] com.install4j.runtime.beans.actions.files.DeleteFileAction [ID 869]: Execute action
Property directoryFilter: null
Property fileFilter: null
Property files: [C:\Users\nim99\AppData\Local\Atlas]
Property filesRoot: null
Property backupForRollback: true
Property recursive: false
Property rollbackSupported: true
Property showFileNames: true
Property showProgress: false
Execute action successful after 0 ms
[INFO] com.install4j.runtime.beans.screens.UninstallationScreen [ID 27]: command: move 1 screens, executing actions, checking condition
[INFO] com.install4j.runtime.beans.screens.UninstallSuccessScreen [ID 30]: Show screen
[INFO] com.install4j.runtime.beans.screens.UninstallSuccessScreen [ID 30]: command: finish
cleaning up
Finished at 2022-10-04 16:20:25
The "Property files: " seem to be ok. This is where my application downloads content to. It does download to sub-folders though:
I looked at the Delete Action and i have the "Recursive" checkbox checked. But the log seems to indicate that recursive is set to false.
Property recursive: false
Edit 2:
I changed the order of the uninstallation actions and now it seems to work!
I had the Uninstall files action first and the Delete files action after that.
With the Delete files action first, it seems to have fixed the problem.

Related

VSTS "Visual Studio Test" task deletes TRX file after publish

I've inherited a jacked VSTS build process and I'm attempting to integrate SonarQube into the mix. Jacked, in that it isn't a clean install and I know the previous owner has done some strange and mysterious things with it that I haven't been able to track down yet.
Anyways, the problem I'm having is that the "Visual Studio Test" task step is deleting the .trx file after publishing the results. I need the .trx file for SonarQube. I can see the trx file is being deleted and after a screen recording of the folder and the active console logging of the VSTS build process pinpointed the publish process where the .trx file disappears. With system.debug = true here are a subset of the logs (the .trx file disappears somewhere in here):
Test results remaining: 165. Test run id: 33.
Leaving UpdateTestResultsAsync
Updated test results: 165
Publishing Attachments: 2
Entering CreateTestRunAttachmentsAsync
Leaving CreateTestRunAttachmentsAsync
Uploading test run attachements individually
Completed PublishTestResult
Completed Publish Test Results: 0
I've tried a number of things, the latest of which was to install the latest VS 2017 Enterprise IDE to the build machine and am using these settings in the task:
Not sure if this helps but here is an approximation of the vstest call the above makes as shown in the console:
vstest.console.exe /TestCaseFilter:"FullyQualifiedName=<all the dlls in my solution>"
"C:\agent\_work\2\s\Source\Sln\Project1\bin\Debug\net461\Project1.Tests.dll"
"C:\agent\_work\2\s\Source\Sln\Project2\bin\Debug\net461\Project2.Tests.dll"
"C:\agent\_work\2\s\Source\Sln\Project3\bin\Debug\net461\Project3.Tests.dll"
/EnableCodeCoverage
/InIsolation
/logger:"trx"
/TestAdapterPath:"C:\agent\_work\2\s\Source\Sln"
/diag:"C:\agent\_work\_temp\4acf64a0-4b51-11e8-9bf5-3b4a52af383b.txt"
-#############################
If I run vstest.console.exe from the command line, the results aren't published and the .trx file isn't deleted.
-#############################
I'd like the Visual Studio Test task step to publish but not delete the .trx file.
Any help would be appreciated. Thanks!
-###################
Update 1: Additional logging of the final "Completed Test Execution" section:
**************** Completed test execution *********************
Current Phase: MS.VS.TestService.VstestConsoleAdapter.ExecuteVsTestPhase Phase Result: MS.VS.TestService.VstestConsoleAdapter.ExecutionVsTestPhaseResults
PERF WARNING: Running the phase MS.VS.TestService.VstestConsoleAdapter.ExecuteVsTestPhase: took 5414.7701 ms
Current phase: MS.VS.TestService.VstestConsoleAdapter.PublishTestResultPhase
Starting Publish Test Results: TIA: False
Starting PublishTestResult
Test results files: C:\agent\_work\2\s\TestResults\SERVERNAME$_SERVERNAME_2018-04-30_07_43_27.trx
Updating Test results: 35
Entering ParseTestResultFiles
runContext.Platform is null
runContext.Configuration is null
runContext.ReleaseURI is null
runContext.ReleaseEnvironmentUri is null
Reading test results from file 'C:\agent\_work\2\s\TestResults\SERVERNAME$_SERVERNAME_2018-04-30_07_43_27.trx'.
Setting run start and finish times.
Attachment location: C:\agent\_work\2\s\TestResults\SERVERNAME$_SERVERNAME_2018-04-30_07_43_27\In.
Adding run level attachment: C:\agent\_work\2\s\TestResults\SERVERNAME$_SERVERNAME_2018-04-30_07_43_27\In\SERVERNAME\SYSTEM_SERVERNAME 2018-04-30 07_43_21.coverage.
Total test results: 168.
Leaving ParseTestResultFiles
pdating test results: 168
Entering UpdateTestResultsAsync
Publishing test results to test run '35'.
PERF: GetTestCaseResults: took 333.1965 ms
PERF WARNING: GetTestCaseResults: took 333.1965 ms
Test results remaining: 165. Test run id: 35.
Leaving UpdateTestResultsAsync
Updated test results: 165
Publishing Attachments: 2
Entering CreateTestRunAttachmentsAsync
Leaving CreateTestRunAttachmentsAsync
Uploading test run attachements individually
Completed PublishTestResult
Completed Publish Test Results: 0
Current Phase: MS.VS.TestService.VstestConsoleAdapter.PublishTestResultPhase Phase Result: MS.VS.TestService.VstestConsoleAdapter.PublishTestResultPhaseResults
PERF WARNING: Running the phase MS.VS.TestService.VstestConsoleAdapter.PublishTestResultPhase: took 1719.7748 ms
Current phase: MS.VS.TestService.VstestConsoleAdapter.RerunValidationPhase
Started RerunValidationPhase for 35
Maximum number of attempts running the failed tests reached: 3
Processed: ##vso[task.logissue type=warning;]Maximum number of attempts running the failed tests reached: 3
Current Phase: MS.VS.TestService.VstestConsoleAdapter.RerunValidationPhase Phase Result: MS.VS.TestService.VstestConsoleAdapter.RerunValidationPhaseResults
PERF: Running the phase MS.VS.TestService.VstestConsoleAdapter.RerunValidationPhase: took 1.1836 ms
Current phase: MS.VS.TestService.VstestConsoleAdapter.CleanupPhase
Started CleanupPhase 35
Test run needs to be marked as complete.
Entering UpdateTestRunAsync
Leaving UpdateTestRunAsync
Completed CleanupPhase 35
Current Phase: MS.VS.TestService.VstestConsoleAdapter.CleanupPhase Phase Result: MS.VS.TestService.VstestConsoleAdapter.CleanupPhaseResults
PERF: Running the phase MS.VS.TestService.VstestConsoleAdapter.CleanupPhase: took 259.2514 ms
Completed the ExecutionStateModel
Completed TestExecution Model...
rc:0
success:true
File exists. Size: 1224675 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.txt
Agent.Version=2.133.3
Agent.TempDirectory=C:\agent\_work\_temp
defaultRoot: 'C:\agent\_work\_temp'
findOptions.followSpecifiedSymbolicLink: 'true'
findOptions.followSymbolicLinks: 'true'
matchOptions.debug: 'false'
matchOptions.nobrace: 'true'
matchOptions.noglobstar: 'false'
matchOptions.dot: 'true'
matchOptions.noext: 'false'
matchOptions.nocase: 'true'
matchOptions.nonull: 'false'
matchOptions.matchBase: 'false'
matchOptions.nocomment: 'false'
matchOptions.nonegate: 'false'
matchOptions.flipNegate: 'false'
pattern: '*host.*.txt'
findPath: 'C:\agent\_work\_temp'
statOnly: 'false'
findPath: 'C:\agent\_work\_temp'
findOptions.followSpecifiedSymbolicLink: 'true'
findOptions.followSymbolicLinks: 'true'
C:\agent\_work\_temp (directory)
C:\agent\_work\_temp\.taskkey (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-43-19_00381_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-25_11343_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-35_20720_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-42_87908_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-43-22_36319_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-25_98843_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-36_03532_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-43_70721_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.txt (file)
C:\agent\_work\_temp\cc80b061-4c84-11e8-87c2-ab8f332e19bd.txt (file)
C:\agent\_work\_temp\cc80b063-4c84-11e8-87c2-ab8f332e19bd.txt (file)
C:\agent\_work\_temp\proxy (file)
14 results
found 14 paths
applying include pattern
adjustedPattern: 'C:\agent\_work\_temp\*host.*.txt'
4 matches
pattern: '*datacollector.*.txt'
findPath: 'C:\agent\_work\_temp'
statOnly: 'false'
findPath: 'C:\agent\_work\_temp'
findOptions.followSpecifiedSymbolicLink: 'true'
findOptions.followSymbolicLinks: 'true'
C:\agent\_work\_temp (directory)
C:\agent\_work\_temp\.taskkey (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-43-19_00381_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-25_11343_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-35_20720_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-42_87908_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-43-22_36319_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-25_98843_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-36_03532_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-43_70721_1.txt (file)
C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.txt (file)
C:\agent\_work\_temp\cc80b061-4c84-11e8-87c2-ab8f332e19bd.txt (file)
C:\agent\_work\_temp\cc80b063-4c84-11e8-87c2-ab8f332e19bd.txt (file)
C:\agent\_work\_temp\proxy (file)
14 results
found 14 paths
applying include pattern
adjustedPattern: 'C:\agent\_work\_temp\*datacollector.*.txt'
4 matches
8 final results
File exists. Size: 11672 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-43-19_00381_1.txt
File exists. Size: 11672 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-25_11343_1.txt
File exists. Size: 11671 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-35_20720_1.txt
File exists. Size: 11582 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.datacollector.18-04-30_07-45-42_87908_1.txt
File exists. Size: 413384 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-43-22_36319_1.txt
File exists. Size: 45500 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-25_98843_1.txt
File exists. Size: 45350 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-36_03532_1.txt
File exists. Size: 45500 Bytes
Processed: ##vso[task.uploadfile]C:\agent\_work\_temp\cc80b060-4c84-11e8-87c2-ab8f332e19bd.host.18-04-30_07-45-43_70721_1.txt
task result: Succeeded
Processed: ##vso[task.complete result=Succeeded;]VsTest task succeeded.
Agent.Version=2.133.3
Release.ReleaseUri=undefined
Release.ReleaseId=undefined
Build.BuildUri=vstfs:///Build/Build/745
Build.Buildid=745
Agent.Version=2.133.3
telemetry area: TestExecution feature: TestExecutionTask data: {"builduri":"vstfs:///Build/Build/745","buildid":"745","codeCoverageEnabled":true,"overrideTestrunParameters":"false","pipeline":"build","runTestsInIsolation":true,"task":"VsTestConsoleFlow","runInParallel":false,"result":"Succeeded","settingsType":"none","testSelection":"testAssemblies","tiaEnabled":false,"vsTestVersion":"15.0.27428","consoleOptionsEnabled":"","rerunEnabled":true,"rerunType":"basedOnTestFailurePercentage"}
Processed: ##vso[telemetry.publish area=TestExecution;feature=TestExecutionTask;]{"builduri":"vstfs:///Build/Build/745","buildid":"745","codeCoverageEnabled":true,"overrideTestrunParameters":"false","pipeline":"build","runTestsInIsolation":true,"task":"VsTestConsoleFlow","runInParallel":false,"result":"Succeeded","settingsType":"none","testSelection":"testAssemblies","tiaEnabled":false,"vsTestVersion":"15.0.27428","consoleOptionsEnabled":"","rerunEnabled":true,"rerunType":"basedOnTestFailurePercentage"}
I can also reproduce the result.
For VS Test task with the version 2.*, it will delete the .trx file after executing VS Test task.
If you need to get the .trx file after VS Test task, you can use VS Test task with the version 1.*. It will keep the .trx file in the source directory.
A possible solution is here
https://developercommunity.visualstudio.com/content/problem/747717/vstest-not-creating-trx-in-folder-testresults.html
Open
Build Details -> Tests -> Filter in Passed Tests -> Open Test Run -> Attachments
The Files are already on the server, but not as artifacts, but under Test Runs
I know this is a old post, but people looking for a solution would be benefited by it working with the latest version of the task. You need to add the path to keep results in a different folder than the "$(Agent.TempDirectory)/TestResults" which will be removed at the end of the pipeline run.
From the information on "Test results folder" of the task...
Folder to store test results. When this input is not specified, results are stored in $(Agent.TempDirectory)/TestResults by default, which is cleaned at the end of a pipeline run. The results directory will always be cleaned up at the start of the vstest task before the tests are run. Relative folder path if provided will be considered relative to $(Agent.TempDirectory)
I have solved it by having the task variable, "Test results folder", pointing to a folder other than the temp directory. With this I could retain trx files after the task is run. In my case, I need trx files for further processing.

uninstaller doesn't delete all installed files

We have a strange problem during our uninstall process.
After the uninstaller finishes, the user custom sources and some parts of the jre are still present on the system. In the uninstaller.log it states the postponed deletion of some of these files, but not all of them.
Has someone an idea why the deletion is postponed and why they are not deleted at all?
Additionally that doesnt happen on all systems, but is reproducable per system. For example on my developer machine everything works fine, but on a fresh vm the problem occurs.
[INFO] com.install4j.runtime.beans.actions.UninstallFilesAction [ID 29]: Execute action
executing auto uninstall
postponing deletion of C:\Program Files (x86)\mytool\jre\lib\rt.jar
postponing deletion of C:\Program Files (x86)\mytool\.install4j\user.jar
postponing deletion of C:\Program Files (x86)\mytool\.install4j\i4jruntime.jar
postponing deletion of C:\Program Files (x86)\mytool\jre\lib\resources.jar
postponing deletion of C:\Program Files (x86)\mytool\jre\lib\jsse.jar
postponing deletion of C:\Program Files (x86)\mytool\jre\lib\charsets.jar
postponing deletion of C:\Program Files (x86)\mytool\jre\lib\jce.jar
postponing deletion of C:\Program Files (x86)\mytool\jre\lib\jfr.jar
postponing deletion of C:\Program Files (x86)\mytool\.install4j\user\myaction.jar
Execute action successful after 717 ms
my first guess was that it has something to do with the user action. but this is part of the automatic updater which is not executed at all.
edit:
after adding an action "Check for running processes" it is still the same behaviour.
[INFO] com.install4j.runtime.beans.actions.misc.CheckRunningProcessesAction [ID 738]: Execute action
Property additionalExecutables: null
Property closeStrategy: Allow soft close
Property message: install4j hat entdeckt, dass mytool zur Zeit ausgeführt wird.
Bitte schließen Sie jetzt die folgenden Instanzen, und klicken Sie auf "Wiederholen", um fortzufahren, oder auf "Abbrechen", um zu beenden.
Property timeOut: 5000
Property allowIgnore: false
Property includeLaunchers: true
Property rollbackSupported: true
Execute action successful after 0 ms
My assumption from this log message is, there were no running processes, as the action is completed after 0 seconds?
This means that a launcher that is using the bundled JRE is still running. Some files in the JRE are locked in that case and they cannot be deleted.
Use a "Check for running processes" action in the uninstaller to shut down all launchers before the "Uninstall files" action is executed.

install4j Extract JAR file exception

For the uninstaller of our application, i need to get a version from one of our JAR files. So i created a ExtractZipFileAction with the following options:
Property mode: 644
Property destinationDirectory: .
Property destinationRoot: Installation directory
Property dirMode: 755
Property fileFilter:
Property showProgress: false
Property zipFile: OurJarFile-1.0-SNAPSHOT-plugin.jar
Property zipRoot: Installation directory
Property rollbackSupported: true
But the execution cancels immediately with a ClassCastException (stack trace from the error log):
[ERROR] com.install4j.runtime.beans.actions.files.ExtractZipFileAction [ID 541]: java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
java.lang.ClassCastException: com.install4j.runtime.installer.helper.comm.impl.UninstallerHelperContextImpl cannot be cast to com.install4j.api.context.InstallerContext
at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.zipActions(AbstractZipFileAction.java:89)
at com.install4j.runtime.beans.actions.files.AbstractZipFileAction.execute(AbstractZipFileAction.java:79)
at com.install4j.runtime.beans.actions.SystemInstallOrUninstallAction.uninstall(SystemInstallOrUninstallAction.java:35)
at com.install4j.runtime.installer.ContextImpl$7.executeAction(ContextImpl.java:1670)
at com.install4j.runtime.installer.ContextImpl$7.fetchValue(ContextImpl.java:1659)
at com.install4j.runtime.installer.ContextImpl$7.fetchValue(ContextImpl.java:1656)
at com.install4j.runtime.installer.helper.comm.actions.FetchObjectAction.execute(FetchObjectAction.java:14)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.executeActionWrapper(HelperCommunication.java:367)
at com.install4j.runtime.installer.helper.comm.HelperCommunication.access$200(HelperCommunication.java:33)
at com.install4j.runtime.installer.helper.comm.HelperCommunication$1.run(HelperCommunication.java:98)`
Note that we're in the uninstaller, not the installer, but the exception complains about casting an UninstallerHelperContextImpl to an InstallerContext. Could it be a problem with the JAR file?
I also set the action elevation type to Elevate to maximum available privileges since i want to extract the files in the installation directory in the programs-folder.
This is a bug and will be fixed in 6.1.5. Please contact support#ej-technologies.com to get a build where this fixed.

Email Extension Plugin - can't get BUILD_LOG_EXCERPT to work

No matter what I put in BUILD_LOG_EXCERPT, all I get is an email with an empty body, thus could use some assistance.
I have a java program that writes to console. Snippet of Jenkins console output looks like this:
...
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building project1 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- exec-maven-plugin:1.4.0:java (default-cli) # project1 ---
Parameters provided: SG, 100, 1000
query: select COUNT(*) from table1 where col1 = ? and col2 = ? and col3 = ?
Rows in table: 5776
Threshold: 100
Rows returned above threshold, skipping dpan generation batch file.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.125 s
[INFO] Finished at: 2016-02-08T09:31:37-08:00
[INFO] Final Memory: 8M/245M
...
In the Jenkins job, I create a Post Build step, and put the following line in Default Content:
${BUILD_LOG_EXCERPT, start="\\b(Parameters)\\b", end="\\b(Threshold)\\b"}
When I trigger the job, all i get is an empty email. However if I add
${BUILD_LOG, maxLines=9999, escapeHtml=false}
then i get the full console output in the email. Any ideas? I am using version 2.40.3 of the plugin.
Looks like your regex is failing to find any matches, so you aren't getting any lines of the log. This is because the BUILD_LOG_EXCERPT variable uses java.util.regex.Pattern.Matcher.matches() to match a regex - and this will only return True if the entire string matches (referenced in this SO question). The log parser is running line-by-line, so it's testing your entire line against your regex and failing (since there are characters after "Parameters").
If you're looking for a string that starts with Parameters but may have characters after it, you can match to
"\\b(Parameters)\\b(?s).*"
which will match "Parameters" and any arbitrary string after it.
BUILD_LOG_EXCERPT in email-ext follows a very simple regex match using start and end. got it working by using two echo statements i.e one at the start from where i wanted the piece of console log and one at the end position of the log you wanted in email.
example :
In Build step :
echo Start
<your build commands>
echo End
In Default section of email-ext use the below line to get it working :
${BUILD_LOG_EXCERPT, start="^Start", end="^End"}
if your using a html email output you can use below line to align output in email
<pre>${BUILD_LOG_EXCERPT, start="^Start", end="^End"}</pre>
you can tweak and get it working , Hope it works for you as it did for me .

Entry of Uninstaller from the Start Menu Shortcut is getting deleted after clicking on the finish button

I have an app which creates shortcuts for launcher and Uninstaller in the Start Menu. It works well on Windows 7 but when I installed the same app on Windows 10, it does creates the shortcuts for both in the Start Menu folder but the entry for Uninstaller is getting deleted just after clicking the finish button on the last installation screen. I think just after clicking the finish button some cleanup action starts as I see in the Installation log but don't know if this is clearing the Uninstaller entry in the Start Menu folder. I am using the 6.0.4 version of Install4j. Please advise how to resolve this.
The logs for creating the start menu shortcuts are below:
[INFO] com.install4j.runtime.beans.actions.desktop.CreateProgramGroupAction [ID 10]: Execute action
Property unixMenuEntries: false
Property uninstallerMenuName: MyApp Uninstaller
Property categories: Application
Property addUninstaller: true
Property allUsers: true
Property linkDirectory:
Property unixSymlinks: false
Property programGroupName: MyApp_1.1
Property addDefaultLauncherLinks: true
Property programGroupEntryConfigs: [ProgramGroupFileConfig{target=MyApp.exe, arguments='', runAsAdministrator=false}]
Property failForSymlinksNotCreated: false
Property rollbackSupported: true
Install file: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyApp_11.1\MyAppHelpViewer.lnk; size: 2149 bytes; exists: false
File options set to: [fileTime: Wed Dec 30 07:50:39 EST 2015, mode: 644, overwriteMode: Always, shared: false, uninstallMode: Always, delayIfNecessary: false]
Install file: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyApp_11.1\MyApp Uninstaller.lnk; size: 2142 bytes; exists: false
File options set to: [fileTime: Wed Dec 30 07:50:39 EST 2015, mode: 644, overwriteMode: Always, shared: false, uninstallMode: Always, delayIfNecessary: false]
Install file: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\MyApp_11.1\MyApp.lnk; size: 2129 bytes; exists: false
File options set to: [fileTime: Wed Dec 30 07:50:40 EST 2015, mode: 644, overwriteMode: Always, shared: false, uninstallMode: Always, delayIfNecessary: false]
Execute action successful after 610 ms
The entry for MyApp.exe and MyAppHelpViewer.exe remains there in the Start Menu folder but after clicking the finish button the entry for MyApp Uninstaller is getting disappeared.
The below log is printed for the clicking finish button:
[INFO] com.install4j.runtime.beans.screens.FinishedScreen [ID 12]: Show screen
[INFO] com.install4j.runtime.beans.screens.FinishedScreen [ID 12]: command: finish
cleaning up
Finished
I have the exact same problem using NSIS Script. The short-cut for the Uninstaller in the start menu is there. Finishing the setup by clicking "Finish": the short-cut disappears... But its there in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\\. It is just not shown in the start menu.
Seems to be a Windows 10 "Feature". But I did not yet find out how it works.