Learn how to a build a cloud-first strategyRegister Now


Home Directories

Posted on 2006-04-01
Medium Priority
Last Modified: 2008-02-01

Id love your help.

Okay here is my problem.

In our Windows 2003 domain, for each windows user account, we set the following in their user properties:

Home Directory Location:
Connect H: to \\server01\users\%username%

We DONT set the Terminal Server Home Directory location.

Now when a user logs on to a citrix session at the moment, it uses the default connection to H drive as expected above.

But what we want is the following:

"Whenever a citrix user logs on to a citrix server, DONT use the default windows home directory to map to H drive"

You would probably say just add a Terminal Server Home Directory, and that would solve it.

The issue is is that we want to set home directories differently depending on what citrix server they log on to.

I dont know how to do this in batch logon scripts and would love your help here.
For example

If computername = citrix1
map home directory to this
If computername = citrix2
map home directory to this
If computername = citrix3
set homedirectory to nothing so it uses the default path

I have tried to do this in a logon script, but I cant get it to work...it still defaults to using the windows home path that we defined...Im presuming you have to set it in the terminal services home directory as well.....but if this is the case, then you can only set the path once for all citrix servers, which seems to be really limiting. There must be a way to override this.

Any help greatly appreciated.

Question by:Simon336697
  • 2
  • 2
LVL 85

Expert Comment

ID: 16350294
I wouldn't call it "limiting": a user's home drive is a user's home drive: it's there for the user's documents, and so it's supposed to "follow" the user, wherever he logs on.
That said, now to your problem: do you really need the user's *home* folder mapped differently, or do you just need a share (in addition to the home drive) that's mapped differently, depending on which terminal server the user is logging on?
In a batch logon script, you can compare against the machine name with something similar to this:
if /i "%computername%"=="citrix1" net use X: \\SomeServer\SomeShare
How to best do this depends on your requirements.

Author Comment

ID: 16351992
Hi oBdA!

Thanks so much for your help.

I do need the users home directory mapped differently for the following reason.....reduce logon times in citrix sessions.

If user Bob who has his home directory located in Perth WA (as defined in his user account properties) logs on to a citrix server located in Melbourne, I dont want Bob's "normal" home directory to "roam" with him to the citrix session.

Ive tried using the logon script from the netlogon share with the if /i %computername%, but this only maps a second drive in addition to his normal home drive.....it doesnt OVERRIDE the windows home directory as set in the user properties.

What Id really like is to set the home directory to something else if they logon to a citrix server, but not use the Terminal Server Home Directory option in the user account properties of their account to do this...which only lets you set it once obviously for all terminal servers.

I have to work out a way to basically reset the home directory variables to nothing then set them again if they log on to a citrix server.

Thanks again oBdA.

LVL 85

Accepted Solution

oBdA earned 2000 total points
ID: 16352493
I can't test it at the moment, but the following should work:
On every terminal server, create a system(!) environment variable, for example "HomeServer"; set this to the name of the server that users on this terminal server should use as home drive server (reboot is necessary before you can use this for a user logon test). Then in the user's Terminal Server Home Drive property, specify the path to the drive as \\%HomeServer%\Home$\%Username%.

If you'd rather continue the path with the logon script, the following should work:
if /i "%computername%"=="citrix1" (
  net use H: /delete
  net use H: \\SomeServer\SomeShare\%UserName%
This might lead to problems with applications that directly query for the user's home drive, though.

Author Comment

ID: 16352573
Thanks oBdA!


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix policies are the most efficient method to configure and tune XenDesktop environments, allowing organizations to control connection, security and bandwidth settings based on various combinations of users, devices or connection types.  Citrix …
Citrix XenDesktop, Citrix Studio, Citrix Policies, Citrix XenApp
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

810 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