?
Solved

My Music Redirection - Custom ADM files

Posted on 2005-03-15
6
Medium Priority
?
416 Views
Last Modified: 2008-01-16
I've read all the posts on redirecting the My Music folder and don't agree that it can't be done.  I've nearly got it finished but need help figuring out one detail.  Here is the scenario.  Initially i tried using a script to get the redirection working only to find that if the script loads after the desktop has already been loaded the registry entries are pretty much useless (at least for folder redirection).  So, I tried running the scripts synchronously only to find out that the GPO takes precedence over the script and essentially nullifies the entries that the script changes.  I've finally come to writing my own .adm file and loading it into the GPO directly.  This seems to work fine except that I'm using this GPO for multiple users and the My Music destination needs to change to their local profile.  When writing a script it is possible to get that information using the %username% variable (which can be attained by querying the system) however using the same variable in the .adm file writes the exact path in the registry and not the decoded path ex.  I want to send music to C:\Documents and Settings\billy.crystal\My Documents\My Music where 'billy.crystal' is %username% initially but when the GPO is loaded I get C:\Documents and Settings\%username%\My Documents\My Music in the registry and not the actual user's name.  Does anyone know how to resolve this?  
I suspect there is an answer to this because when you redirect the My Pictures folder in the MMC console you are allowed to use the %username% variable in the path.
0
Comment
Question by:-_-aaron-_-
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 85

Accepted Solution

by:
oBdA earned 2000 total points
ID: 13549606
Yes, there is an answer to this.
EDITTEXT will write to a REG_SZ value by default; this string type will not be expanded. You need REG_EXPAND_SZ; this is done by specifying EXPANDABLETEXT; for example:

PART "My Music Redirection Target Path:" EDITTEXT REQUIRED EXPANDABLETEXT
  VALUENAME "Favorites"
END PART

Administrative Template File Format
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/policy/policy/administrative_template_file_format.asp
0
 
LVL 35

Expert Comment

by:Nirmal Sharma
ID: 13554672
?
0
 
LVL 2

Author Comment

by:-_-aaron-_-
ID: 13566902
Although that would seem to work for other registry entries the My Documents situation happens to be a bit of a stickler.  The my documents folder seems to be closely tied in with several system dlls that for some reason will not allow me to disassociate the My Music folder from the location of the My Documents folder.  Has anyone done this in real life (no theories please, i've tried many)?  
oBda...that was a good answer and unless someone can give me an exact answer as to how to redirect the folders I'll give you the credit (either way i'll give you partial credit).

Other thoughts... are there other registry entries/files tied to the My Music redirection...
Making changes to the My Documents registry entries has no effect on changing the location however if you right click and modify the My Documents folder directly the changes take effect immediately (thereby moving the my pictures and my music folders too)
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 85

Expert Comment

by:oBdA
ID: 13567999
I haven't tried to redirect the "My Music" folder separately yet, just the regular folder redirection policy of "My Documents". A separate redirection of Favorites and Cookies works. You're using Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders, I assume?
0
 
LVL 2

Author Comment

by:-_-aaron-_-
ID: 13569225
Yes.
0
 
LVL 2

Author Comment

by:-_-aaron-_-
ID: 13569255
Be prepared to pull your hair out...
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
I don't pretend to be an expert at this, but I have found a few things that are useful. I hope that sharing them here will help others, so they will not have to face some rather hard choices. Since I felt this to be a topic of enough importance and…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

764 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