Jump to content

Setting drive labels thruogh the registry


Recommended Posts

During my unattended setup I'd like to set drive labels for partition C: and D:. On this forum I found a useful registry entry to accomplish this:

;Set label for drive c:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultLabel]
@="System - NTFS"

This works great, so I thought to use the same method for drive D:

;Set label for drive d:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\D\DefaultLabel]
@="Documents - NTFS"

But this doesn't work... The drives are preformatted with NTFS prior to Windows XP setup starts.

What am I doing wrong?

Link to comment
Share on other sites

  • 9 months later...

The below reg syntax is working well with me :

;Change Drive name and icon
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\A\DefaultLabel]
@="Futile Drive"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultLabel]
@="WinXP"
;change my drive icons
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\A\DefaultIcon]
@="%Windir%\\Web\\MyImages\\hearts.ico"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons\C\DefaultIcon]
@="%Windir%\\Web\\MyImages\\MSOffice.ico"

And i wanted to know whether there is a way to substitute drive letter(A, C) in the above code with something like %systemdrive% coz this tweak is applied from an unattended install and i never know which would be the XP system drive. (If C has win2k, i would install XP in D: and would wish to apply the label to D: as WinXP. In another computer, I would install in C: and would label C: as WinXP, with this tweak).

BTW, i wanted to change the account picture using registry, but it never worked as i tried many times.

;Change Account Picture
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Hints\Administrator]
"PictureSource"="%Windir%\\Web\\MyImages\\AccPic.bmp"

AccPic.bmp is 48*48 bitmap. I replaced %windir% with C:, but it still doesnt work. Anyone have a solution?

Edited by rajesh.kumar
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...