Maybe this is a newbie question but I’m trying to run a powershell command in the post-installation section. Something like Move-Item -Path $path2 -Destination $path -Force. How can I make it verbose and also log this command into the logfile?
The toolkit generates extensive logging for all toolkit and MSI operations. If you use the toolkit function Copy-File (and perhaps Remove-File on the old file) this would give you the following log entry in the log file for the script (found in %windir%\logs\software):
[Post-Installation] :: Copy file in path [SOURCEFOLDER\Example.ext] to destination [DESTINATIONFOLDER\Example.ext] Copy-File 30.07.2015 12:00:00 5644 (0x160C)