[Bug]: Symlink to logfile no longer gets created
s016aq opened this issue · 6 comments
The problem
I noticed that the symlink to the logfile is not being created during install any more (from version 1.18.0?)
Instead it's being created when the scheduled task is triggered (Winget-Upgrade.ps1)
But it is not created!
If I run Winget-Upgrade.ps1 from Powershell_ise (as SYSTEM) it works. But not with the Scheduled task.
If I remove ServiceUI.exe it works. So it has something to do with the script is spawned again with ServiceUI
What version of WAU has the issue?
from 1.18.0
What version of Windows are you using (ex. Windows 11 22H2)?
Windows 11 23H2
What version of winget are you using?
1.6.3482
Log information
No response
Additional information
No response
The existing logic expects to have full folder tree up to \Logs\WAU-update.log
if that folder structure is missing, then symlink is not created.
Was the folder present before WAU got installed?
Winget-AutoUpdate/Sources/WAU/Winget-AutoUpdate/Winget-Upgrade.ps1
Lines 338 to 343 in acee968
Maybe we should change the way we create the Symlink?
During the installation of WAU? Let's create an empty WAU-updates.log
if it doesn't exist, and create the symlink at this moment. This way, context should be admin account OR system (without serviceui.exe) and should success.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.