While deploying powershell script via intune which all lfget.exe with this command:
install-product --product {A} --iacceptlicenseagreement --iagreetoprereqs --installation-code {B}
I get when run via intune using system context which use NT AUTHORITY\SYSTEM account:
System.IO.IOException: Le processus ne peut pas accéder au fichier 'WindowsClient 12.0.2510.972.exe', car il est en cours d'utilisation par un autre processus.
à System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
à System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
à LaserficheInstaller.DownloadAndInstallService.Dispose(Boolean disposing)
2025-10-27 18:50:01 L7678(30464) Error: Failed to clean up (i.e., delete) the temporary folder C:\WINDOWS\system32\config\systemprofile\AppData\Local\Laserfiche\LFInstaller\Temp\221b7872-3a35-447b-b487-d9b7d0ffa74e because: Le processus ne peut pas accéder au fichier 'WindowsClient 12.0.2510.972.exe', car il est en cours d'utilisation par un autre processus.
When I run it locally with administrator right as my own user it work.
I also tried to use
download-product (to use a different path) and install-local-package (would be nice if we could just specify the folder path of the package)
but it still fail because it end up extracting the .exe to same location. Can you fix the permission issue (or wait correctly before it delete) or allow us to specify a temp folder which we could make sure the intune account would have enough privileges.