Terminal Services and temp files

Posted on 2004-11-05
Last Modified: 2010-03-18
Hello all
Here's my problem.  I have an application on Terminal services server 2003 and when a user prints it creates a temporary word file.  The problem is that it only sees one user temp file so that one user can continue to print but nobody else can print because it thinks word is still open.  If I delete this temp folder than somebody else can print.  My question is how can I get the TS users there own temp directory so the temp file goes to that user instead of the application seeing it as only one user.  Thanks in advance.
Question by:jamesbryan2004
    LVL 3

    Expert Comment

    Where is the application storing its temp files?
    Are they in a system specified temp directory - eg C:\documents and settings\user\local settings\temp\
    or is the application creat it's own temp folder inside the program folder - eg c:\application\temp\
    There is a system variable for temp location and nice applications should use this instead of some hard coded location. Figure out which case you fall into and then we can possibly find some workaround.

    if you open a command prompt and type
    you will get a list of all the system variables, see if the one for temp or tmp matches the location of the temp file.

    Author Comment

    The application created it's own temp folder inside the program folder.  The fix was to give rights to the application folder so that people could write to this temp directory.  
    LVL 3

    Expert Comment

    Is the application called "finance plus" by any chance?
    Anyhoo.. what you might be able to use is a logon script and junction points.
    It would allow you to point that temp folder to some other location. In the logon script you would use something like the username variable to give everyone their own temp folder and still keep the app working.
    Have a look at these two sites.

    I think you want to put something like this in a bat file in the login script for the terminal server:
    md c:\mytemp\%username%
    linkd c:\mytemp\%username% "c:\finance plus\temp"

    Then delete it in the logoff script:
    linkd c:\mytemp\%username% /d
    rd /s /q c:\mytemp\%username%

    You need the double quotes when the path has a space in it.
    Let me know if you need help with the group policy to make this work. Maybe just test manually with two users first?
    Oh, you could also use the %sessionname% variable in case people logged on twice.

    Author Comment

    No it's not finance plus it's an attendance program.  I'm pretty new to windows server We use novell except this application.  Is there a tid that you know of to help me create a login script and things?  Thanks.

    Author Comment

    I've used your login script but the linkd parameter fails.  It's not recognized as a command.  Thanks.
    LVL 3

    Accepted Solution

    You will need to get the resource kit from and put linkd.exe in a folder in the system path.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now