• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 631
  • Last Modified:

Folder Redirection w/ Env Variables

I'm trying to do folder redirection for "My Documents."  We just migrated from an NT server and had the users Documents on a 2000 server.  Now, I want to redirect to those same folders on the 2000 server.  When I go to Redirection under Users in server management I can type in the share like :

\\file\users$

Then it automatically just adds "%username\My Documents"

I only want the %username% appended, like :

\\file\users$\%username%

How can I do this?


PS If I type \\file\users$\%username% in for the path, it says folder cannot be found.
0
turtletimer
Asked:
turtletimer
  • 5
  • 5
  • 3
  • +2
3 Solutions
 
rustyrpageCommented:
I think that the supported way to do something like this is to have a login script that maps their userfolder to a drive

IE:

Net use H: \\servername\username$ /y

Then, what I have done is just told the folder re-direction to always go to H:.  That way, in the future, if you change anything, all you have to do is change where H: is located (remap it to \\servername2\username$)

0
 
turtletimerAuthor Commented:
The folder redirection won't take h:\

It says h:\ does not exist.  Maybe I need to do it through Group Policy and not through Server Management.
0
 
rustyrpageCommented:
H:\ doesn't exist until you map a network drive to that.  I do it all the time & it works great.  

Just make sure that every user in your enviroment has H: mapped to \\servername\username$
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
turtletimerAuthor Commented:
H:\ is mapped.  

Are you doing this through Group Policy manually or through server managment?
0
 
rustyrpageCommented:
I have done it through Group Policy in the past.  
0
 
turtletimerAuthor Commented:
I'm attempting that right now without any luck.

I created the object and then linked it.  Could you give me any tips?
0
 
rustyrpageCommented:
I don't know then...I have done it quite a few times in the past without problems...maybe someone can help you past that hurdle.
0
 
mattridingsCommented:
It sounds like what you are really trying to do is remove "My Documents" from the standard UNC redirection path.  Only way to do that I believe is if you don't use the built in wizards for redirection and instead use scripts.  I don't recommend this on SBS since quite a few tools expect redirect locations to be in a particular place (Backup scripts for example).  You've got a couple of things going on with Users shares that we should clarify though.

You have a "Users" share on SBS, that is *not* necessarily associated with redirection.  i.e. it's just a shared network folder per user for them to store information in if desired but it doesn't do redirection.  This is created on the SBS server as the share "Users". And automatically appends the username directory for you.  For example C:\ShareFolders\Users\%username%

You can also have that same share used for redirection, but the redirected folder exists as a subdirectory of the above share.  i.e. the users "My Documents", or other defined local user folders are redirected from the local machine to be housed on the server instead.  In the default SBS environment these are created as subdirectories of the "Users" share on the SBS server.  for example C:\ShareFolders\Users\%username%\"redirected_folder"

For ease of administration in the future I would recommend either manually or via a small script, changing the current folder structure where your users files are stored from %username%/  to %username%/My Documents/ so that the end result is those files are in a 'My Documents' (or other folder you are redirecting) subdirectory.  Then just make sure that the permissions are correct on the subdirectory.  From that point you can use all the standard wizards in SBS to manage the redirection, etc.

There was another question recently where Jeff and I discussed the two mechanisms for pointing to a network share instead of a local drive share on SBS.  I'll look up the link and post back in a sec.  My way was to:

Remap the "Users" share on the SBS server to point to the other network shared location instead of the local drive.  Make sure that the share on SBS is still called "Users" (it currently already exists as a local share on SBS).

Now the redirection wizard, backup, etc. will all work.  All of the wizard tools just reference a UNC path on SBS called 'Users', and not a physical path, to make it easier for you to change locations without having to rerun everything.  So as long as \\your_sbs_server\Users maps to the location you want, even if that's another server, everything will work fine.

Matt Ridings
MSR Consulting
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
The first thing you need to do is make sure that your Windows 2000 server was connected to your SBS 2003 properly by using the http://<servername>/connectcomputer wizard.  This wizard completes a number of tasks that are vital to the interoperability of additional servers on your network.  Please see http://sbsurl.com/addserver for more info.

But assuming that you may have already done that... your real question is that you don't want the "My Documents" folder to sit under the %username% folder.   There is a good reason for this configuration, and it's really transparent to the end user.  That's because it's the MY DOCUMENTS folder that's being moved, not just it's contents -- users will access their documents by just opening the My Documents folder on any machine they log into.  

By default, offline file synchronization will be enabled that will keep a cached copy of their files on the local machine.  This is great for laptops... and for workstations, I think it's a nice redundant backup.  It's only an issue the first time someone logs in because it has to cache everything.  The other issue with offline files is that some files, such as Access databases can't be synched.  More on that below...

So on each workstation,  you will notice that if you correctly added users and computers to the network with the wizards, there is a special link in each user's My Network Places folder that goes to their %username% folder on the server.  This allows users to store things other than documents on the server share... such as Access Databases outside of their My Documents folder.

With all that being said, I guess I should ask why you don't want the folder structure to be that way?

Jeff
TechSoEasy

0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
P. S. to rustyrpage... that technique is a legacy method.  SBS 2003 does not really need mapped drives in most cases (the exception being things like Quickbooks which won't work without them).

Mapped drives cause slower booting and logins and should be avoided if possible, since network shares are available through Active Directory these days.

Jeff
TechSoEasy
0
 
mattridingsCommented:
Jeff,
I hear that all the time when I'm sitting around having philosophical tech discussions....but in reality I have to admit I'm confused as hell about it.  What exactly are you guys doing to make it as simple for the users as mapped drives are? (or for that matter as simple for the admins as well)  If you asked 99.9% of my clients to "look something up in active directory" or said to use a UNC path all you'd get in return is a blank stare, and I consider them smarter than the average smb user.

I publish everything via AD but still write login/logoff scripts in the group policy to map drives and printers based on OU's, etc.  I purposefully turn it off because I think group policies apply more consistently but with the Fast Logon defaults in XP does  it really still take longer to log in with mapped drives?

I'm truthfully not being sarcastic here, I hear it often enough that I'm seriously just wondering if there's some big gap in my deployment knowledge that I could be taking advantage of.

Matt Ridings
MSR Consulting
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
mattridings,

The difference is that this is SBS, which is a PRE-CONFIGURED environment.  Both AD and DNS have default settings which should NOT be changed.

Instead of using mapped drives, all you need to do is use shortcuts to the UNC paths.  That's all... It will speed things up upon login, and it will cut down on the network chatter between machine and server to keep the share connected.

With SBS you never need to map printers, it's done automatically by including the printer in SBS's Printer section of the Server Management Console.

Also, remember that on an SBS all users must be in the same OU.  Different permissions are granted through Security Groups which can be linked to specific GPOs.  Fast Logon only complicates the issue.  If mapped drives are scripted through a GPO, the policy may not have completely run by the time the user sees their desktop... and mapped drives would therefore be unavailable until the group policy refreshes.  Whereas a link to a UNC path would always be available.

Mapped drives also conflict a bit with Folder Redirection, in that Folder Redirection occurs very early in the logon process and mapped drives are much later.  If any folder on a mapped drive was also configured for offline file synchronization, the process would fail.

There are two primary functions that mapped drives have been used for in the past (other than the specific type example I mentioned above with regards to Quickbooks) -- a user's "Home Folder" and the shared "Company Folder" or "Department Folder".  Since SBS automatically configures a user's Home folder as a Network Place, this definitely shouldn't be mapped... it's already there.  If they want easier access, then a shortcut should be placed on the desktop or the Quick Launch bar.

For shared company documents... I would absolutely use SharePoint over Windows Explorer.  This requires a major CHANGE in how users access these files, and requires very careful planning and education.  However, in all of the SBS installations I've done in the past few years, I've yet to hear a client tell me that they don't like SharePoint once they get used to it.  In fact, SharePoint is generally the bulk of my add-on business with current clients because they realize that by paying me to configure solutions they will end up saving a lot within a very short period.  So, just using SharePoint for company shared documents at first is the easiest way to generate interest and for users to adopt the technology.

Instead of writing logon scripts to map the drives, just configure a GPO to add specific shortcuts to a user's desktop, or favorites list.  (Actually you can modify Favorites that SBS deploys which are located in the IE branding file here:  C:\Program Files\Microsoft Windows Small Business Server\ClientSetup\Clients\Setup\install.ins  (edit in wordpad)

Jeff
TechSoEasy
0
 
rustyrpageCommented:
I still don't think that eliminating scripts is really worth it...it is what everyone is used to & I have never seen it take such a toll on logins (my logins take 10 seconds).  People think in terms of H: drive, G: drive, X: drive.  When you are dealing with people who do not even understand when you say "Where did you save that document" (common response "Word", then you cannot expect them to understand that a shortcut on their desktop is something other than a folder on their desktop.  

In the world of high-speed networks, computers & thinkers, I still think that mapped drives are a VERY good way to go because it makes sense to everyone.
0
 
mattridingsCommented:
I guess I just don't get it.  When a user goes to "File - Save As" in their applications they expect to see a drive letter...not have to browse the network looking for a shared folder off of a server whose name they have no need to know.

In regards to printers, many of my clients don't want everyone to have access to all the printers (particularly that high end color laser stashed in the corner for the marketing folks :)  ).  In regards to drives, I can map the same drive 'letter' for all the users...but to different share points depending upon what group they are in and manage totally distinct permissions and quotas for each.  That way I keep the documentation and training the same for everyone, even if they are actually using different physical shares.  Not sure how I'd replicate all that behavior with just shortcuts?

What I'm looking for is something that is of true benefit to the *user*, not to the admins.  As an admin I'd take scripting any day, but if there is something that will make my users live
easier then I'd certainly be all for it.

p.s. - In my scripts I actually run a few hundred millisecond delay before doing a check to see if the processing of group policies has reached a point in which I can extract the groups, etc.  This technically isn't supposedly necessary anymore as only 95 and 98 are documented with the issue...but I just disable fast login and leave it there anyway.  Certainly don't have noticeable long logins though, even with synchronous policy processing and my scripted delay.

Matt Ridings
MSR Consulting
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
They don't have to browse the network for a folder... Programs all have default file locations, first of all... and second of all they either save the file in "My Documents" or "General Documents on Companyweb" (which is how SharePoint looks in Windows Explorer.

It would seem to me that "MY" and "COMPANY" are much more descriptive of locations than "H" "X" or "Q"!

The true benefit to the user can be seen in a number of ways... especially since rustyrpage stated, "you cannot expect them to understand that a shortcut on their desktop is something other than a folder on their desktop".  This is an important concept for anyone to learn, and I totally understand where you are coming from, but ALL of my clients have learned this quite easily... because the benefit to them is that their documents are stored on the server, and therefore backed up every night... but more importantly, because of the default settings of Volume Shadow Copy Service, a snapshot of the server shares is taken each day at 7:00am and 12:00noon... this allows users to retrieve previous versions of documents or even entire folders from within the past 30 days or so... that's a huge thing for someone who accidently saved the first page of a 200 page document on top of the original... thereby deleting all the other pages!

I could give you hundreds of examples of why SharePoint is more effective than just a shared company documents folder... probably the one that Business Owners like the most is version control... not having 6 different versions of a shared form letter, (for instance), because separate copies have been saved on each person's desktop.

Will end-users have to make changes?  YES... but the world is changing as well.  

Microsoft has created a terrific Knowledge Worker Training Guide for these folks... I've presented it a few times and have gotten great feedback.  I might mention as well that I place a high importance on continual training with my clients... it's much better that they pay me to do that than to troubleshoot ridiculous legacy issues and writing scripts (not that scripts are bad... it's just that I'd rather train users and empower them.

The training guide is here:  http://sbsurl.com/training

Jeff
TechSoEasy
0
 
Jeffrey Kane - TechSoEasyPrincipal ConsultantCommented:
A couple other things...

Matt...  Regarding Printers... if there is a printer that I need to restrict access to, I just create a User Template called "printer restricted" for example, and then create a security group that I add to that template which DENIES access to that particular printer.  I then apply that template to any user that it's appropriate for.  When new users are added and they also need to be restricted, then the template is already there to use.

User templates also manage quotas and since you can specify logon scripts, profile locations, and home folders, they make it quite easy to do exactly what you are currently doing... but in a more organized and automated way.

Look... I'm not sure how long you've been at this stuff... but probably a lot longer than I have.  While I have a fair amount of experience with Server 2000, I have NO experience with NT... I really only got interested in small business networks when SBS 2003 was released.  I started my consulting practice specifically because of SBS 2003.   So, I don't have any history of "this is how I've always done it".  Instead I've embraced the newer technology and while I have gone back and learned about a lot of legacy things... I prefer to not use them since I've found that doing so takes me significantly longer to get everything done in a day.

Your methods work... but for me, mine are more effective... for you they may not be.

Jeff
TechSoEasy
0
 
ktwadeCommented:
I redirected my documents to a \\servername\userFolder\%username% successfully without having the username\my documents.  This gave me a problem at first but I set it to redirect to the following location, put in my path with %username%, closed it.  Reopened gpo and I noticed it was set to create folder at the following location with the same path, closed it.  Now my documents gets redirected to the parent directory of their userfolder instead of \my documents.  I haven't had problems since, I think this may be a bug.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 5
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now