Page 1 of 1

Issues with Intune, Controlling TEMPDIR

Posted: Mon Oct 03, 2022 9:23 am
by Sheri_Steeves
We are working with a client who is trying to install our IA generated setup via Microsoft Intune as SYSTEM.

When running the install as ALLUSERS=TRUE it is failing saying it cannot create the TARGETDIR folder, that a folder or file of the same name already exists. Troubleshooting with the client shows the TARGETFOLDER dies not exist on the system when Intune is syncing/pushing the software.

One thing we were trying to do as part of troubleshooting was running under psexec as SYSTEM and to try and redirect the location of the TEMP folder where the mia\XXX files are extracted prior to install. I tried passing TEMPDIR="XXX" on the command line but IA still uses the C:\Windows\Temp folder. Is there a way to redirect this from the command line?

Re: Issues with Intune, Controlling TEMPDIR

Posted: Sat Oct 08, 2022 4:19 am
by FrancescoT
It's not possible to redirect the TEMP location from command line.

Under SYSTEM account the default temp dir is "C:\Windows\Temp". So if the setup really executes as SYSTEM, the process should not have any problem with accessing such temp location. I have personally used psexec to install as SYSTEM account and have never had any problems.

You may try with defining an alternative TEMP location in "SYSTEM environment variables".