Moving your Temp folder can sometimes cause printing issues in Windows, depending upon how the Permissions are set in the destination folder or drive. After changing your TEMP or TMP user environment variables in order to move your Temp folder to a different drive, the new Temp folder inherits the Permissions from parent, often resulting in missing NTFS Permissions for your user account.
After moving the TEMP folder, running the command ICACLS %TEMP% from Command Prompt typically shows the Permission entries as below, or slightly similar:
BUILTIN\Administrators:(I)(F) BUILTIN\Administrators:(I)(OI)(CI)(IO)(F) NT AUTHORITY\SYSTEM:(I)(F) NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F) NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M) BUILTIN\Users:(I)(RX) BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE)
There are two things here, your user account is missing in the list. Also, Authenticated Users and Users have Modify and Read/Execute accesses for your TEMP folder, which are not required. With the above Permissions, the following problems occur:
Test page doesn’t print from standard user token, even if you’re administrator. Elevated programs are able to print.
Microsoft Print to PDF generates a 0-byte file or does nothing when printed as standard user.
In short, the following are the Permission entries we really need.
NT AUTHORITY\SYSTEM:(OI)(CI)(F) BUILTIN\Administrators:(OI)(CI)(F) W10-PC\Ramesh:(OI)(CI)(F)
*where Ramesh in this example, is the user name.
Here is how to fix the Permissions for the TEMP folder.
Fixing the TEMP folder Permissions
Open a elevated or Admin Command Prompt. Type the following commands exactly as given below, and press ENTER after each command:
icacls %temp% /inheritance:r icacls %temp% /grant %username%:(OI)(CI)F /T /C icacls %temp% /grant Administrators:(OI)(CI)F /T /C icacls %temp% /grant System:(OI)(CI)F /T /C md %temp%\Low icacls %temp%\Low /setintegritylevel (OI)(CI)low
The first command removes all inherited Permissions for the TEMP folder, and the next three commands are to grant Administrators, SYSTEM and your user account Full Control Permissions recursively (including sub-folders and files). And the last command sets the integrity level of %TEMP%\Low folder to Low Mandatory Integrity Level, so that the folder can be accessed by programs running in low IL, like Internet Explorer. This needs to be set in order to avoid printing issues in Web browsers, like Internet Explorer.
Now you get this result when running ICACLS %TEMP%, which is exactly what we need.
That should fix printing issues related to incorrect NTFS Permissions. You can of course configure the same Permissions using Permissions dialog via Temp folder properties; but I personally prefer Icacls because it’s a quicker way to accomplish the task. If you’re doing it using Permissions tab, it should eventually look like this.
About the author
Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in Windows — delivering support for Microsoft's consumer products. He has been a Microsoft MVP (2003-2012) who contributes to various Windows support forums.