Creating Folder behind session id # script
Posted on 2011-04-20
Our users who log onto our RDP farm (server 2008 r2) are unable to print from i.e 8, they just get a blank page with a file location printed across the bottom. I know the reason for this, the \Low folder is not being created in the %temp% folder. After researching I have found this bat fix from microsoft.
Icacls %TEMP%\Low /setintegritylevel Low
If I log onto the farm as a user and run this bat, it works 100% fine and fixes the issues people are having with the printing. However I want this to automate the procedure as each time they log off that folder is deleted, so I tried a logon script, I also tried a scheduled task in the GPO, as well as trying a folder creation. None of these work. Trying to automate the process meant the Low folder is created before the session ID.
Appdata\Local\Temp\Low\session id number\
However it should be
Appdata\local\Temp\Session id Number\Low
I tried adding a delay to a scheduled log on task of 30 seconds to see if the system needed to assign a session ID # before continuing. But this does not work either.
Ive tried the following additions to the script..
Mkdir %TEMP%\%SESSIONNAME%\Low (this creates a RDP_TCP#session id folder)
All that these do is make a folder called the additions..
I just want to create the Low folder behind the numbered session ID folder!
Any ideas.. assistance ?