Forum Discussion
Deploying Win32 Apps that use scripts to install - first install takes forever
klenTAHNthanks for those pointers. #1 certainly sounds like it might play into the issue - I'm surprised it doesn't seem to be more common of a problem if that's the case. Would love to know if there's a way to confirm that in the logs and/or speed it up. I do use the syntax in your #2 examples too.
Rudy_Ooms_MVPyes, it only happens the first time, and only when a script (CMD or powershell) is called for the install - all other scripts run without the long wait no matter how long after the first install or reboot. I can certainly access the appworkload log - could not find the company portal log (or it's logged under a different log file name/location and I'm not aware).
Our default Delivery Optimization policy sets our end-user PCs to "HTTP only, no peering (0)" mode for updates and to restrict download bandwidth (foreground and background) usage during business hours. I am also playing with a few endpoints that use the DO settings recommended https://www.2pintsoftware.com/news/details/delivery-optimization-recommendations-for-microsoft-intune. So far, I haven't noticed a difference in that first endpoint script execution time under either policy.
- wardraAug 11, 2025Copper Contributor
KJW_PK201
Wondering if you found a solution for this? Seems like I have the same issue.- KJW_PK201Aug 11, 2025Copper Contributor
It has something to do with the detection script the first time an application installation is run. For me, the solution was to pick a winget-deployable application that I deploy to all my endpoints, but with manual detection logic (File/Folder/Registry, etc) instead of the detection script. After that all future installs, even if they use a script for detection, no longer exhibit the delay.
Note that this might need to be done once for a System-mode install and once for a User-mode install. I am testing the User-mode scenario myself. But it definitely worked for installs that run in System mode.
I don't have an explanation for why it is like this though, or if our situation is truly uncommon among admins that use Winget to deploy applications made available via Company Portal.