Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I check off the print to file option in my postscript driver and no matter where I tell the file to go, it ends up in a very special folder.

It took me days to finally find where Vista is hiding my postscript files. It’s storing them in some virtualized path that is hidden:

C:\Users\MyUserName\AppData\Local\Microsoft\Windows\Temporary Internet Files\Virtualized\C\Users\MyUserName\temp

What’s even more interesting is that I un-check the hidden attribute of the Virtualized folder, but no, Vista insists on keeping it hidden. Sure, the hidden bit is off, but no folder shows up in Explorer or search. I found this only because someone else mentioned this special place on a blog.

Is there a way to make the printer driver send the file to an actual folder?

share|improve this question

migrated from stackoverflow.com Jul 6 '10 at 2:11

This question came from our site for professional and enthusiast programmers.

    
And i see that Jerry hasn't logged on in a year, so my treatise answering what he's seeing will never get the "Acceptance" it deserves :( –  Ian Boyd Jul 5 '10 at 16:00
    
@Ian: He might have selected to be emailed about new answers. –  Roger Pate Jul 5 '10 at 19:48
    
You migrate it to SU, where the op doesn't even have an account? FFS –  Ian Boyd Jul 7 '10 at 15:45

3 Answers 3

This postscript driver is trying to place the file in:

c:\Users\Jerry\temp

Note: i don't know why it's trying to place it in your temp folder - that's the fault of the print driver.

But the process, that is doing the printing, has been marked as Integrity Level: Low. This means that the process is very limited in what it is allowed to do on the computer.

One of these limitations is only being allowed to write to file system locations that are set to allow Integrity Level: Low writes (i.e. c:\Users\Jerry\temp does not allow low integrity writes). A default install of Windows Vista/7 marks only two folders with the Low Mandatory Integrity Level:

  • %LOCALAPPDATA%\LocalLow
  • %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files\Low

These are the only two places that a "Low" integrity process are allowed to write.

If a process gets "access denied" while trying to save a file: Windows will silently try the save again, but this time redirected to a location that allows the write. (Note: This is a compatibility hack for applications that were written before Low Integrity existed)


The same effect happens if you try to write to a location that requires administrator access, but you're only a standard user. e.g. if i try to save a file to:

C:\Windows\test.txt

The write will fail, and Windows will silently try the save again, but this time to:

%LOCALAPPDATA%\Local\VirtualStore\Windows\test.txt

Later, if you try to open

C:\Windows\text.txt

Windows will silently redirect to the copy in the Virtual Store.

This is all done so that applications, which incorrectly assume that all users are administrators, will still function when the user is really a standard user.

Note: On Windows XP these applications would fail, and usually horribly, when they were not allowed to save wherever they want. Microsoft added, with Windows Vista, this huge compatibility infrastructure to allow these rogue applications to work as standard user.


Next question: why some folders are hidden when you unhide them.

Folders having the Read Only & System attributes are understood to be special system folders. In order to see them, you have to change your Windows Explorer preferences, and turn off:

  • Hide protected operating system files (Recommended)

Additionally, your Temporary Internet Files folder is marked as hidden, so you'd also have to turn off the option:

  • Do not show hidden files and folders

You might be wondering how Internet Explorer can download files; when it's not allowed to write to any location except the Mandatory Integrity Level: Low location.

The answer is that once the file is downloaded, the process running the tab communicates back to the Internet Explorer controller host, and asks it to move the file to your requested location. The IE controller process runs with your (standard user) privelages - while each tab runs in a Low Integrity process.


i think if you print something from Notepad, or Word, or some other "regular" integrity level process, that the save will work fine...to the temp folder.

i'm surprised it doesn't ask you where you want to save the file.

share|improve this answer

Did you try searching the registry for that path or perhaps the last part of it (C\Users\MyUserName\temp, for example)? If you find it, you may be able to change the setting, directing it to a different location. Not sure if you can prevent it from using a virtual directory or not.

share|improve this answer
    
Good idea. I'll give that a try tonight. –  Jerry May 6 '09 at 20:54

Why is it going into "Temporary Internet Files"? Is your driver running in the context of Internet Explorer by any chance? IE virtualises a lot of file access for security reasons, in order to prevent code writing to protected locations.

share|improve this answer
    
I was printing a web page from IE 7. This is a vanilla copy of Vista and all I did was install the generic version of an HP color printer. All I want to do is have the printer driver output the .PS file to some real location on my disk. –  Jerry May 6 '09 at 20:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.