This article was originally written in 2008, and was copied to this wiki in June 2013. It covers both moving XP windows directories from the internal local drive to the external disk, and some wish scripting to check the disk was on and remind people to turn it on if not already done. This article talks about the disk, filesystems, transferring the data, and writing some tcl/tk scripts including an motd to manage the remote “My Documents” folder. I changed the title from “External Disk on the Dell” since I had re-purposed the disk by 2013. This is now deprecated.

The Disk

I installed a 500 Gb disk on the Dell 5150c.

This was originally installed with a FAT32 filesystem. I converted this to NTFS, using the command line convert utility. See also …Convert FAT disks… at Microsoft Technet.

Moving Data

I want to mount the ..My Documents directories on the disk.

How do I move the “All Users” documents directory? I have asked at the Dell Community forums, here, and their best advice is at Ramesh’s Site.

I asked for advice at the Dell Users forums. have been advised that doing what I want, which was to move the Documents & Settings folder is exceedingly difficult without image management tools which I don’t have. I have therefore adopted another correspondent’s advice and used the windows xp interface to ‘Move’ the various user’s ‘My documents’ folder.

I created an additional administrator user with a ‘My documents’ on the C:\ drive just in case.

The Plan

  1. Install a new user, give it administrator privileges, I have no designated administrator.
  2. Create Folders for each user on the external disk
  3. Use My Documents >> Properties to amend the user’s My Documents location, I might take safety copies before I do this, but it should be all right.
  4. Work out how to move the “All Users” documents directory and do it.(See above).
  5. Write a motd script that reminds users to turn the disk on as they login and install it.(See below.)
  6. Work out which users mail directories are best moved.

motd script

My testing shows that with the external disk off, a user with the My Documents located there will login but pressing the My Documents icon leads to an error message.

I have written a tcl/tk script to check if the disk is mounted and remind people to turn it on. I have installed Active States’s tcl.tk tool set. I have dropped an info & warning .gif into the $tk_library/images folder. So I test if the disk is mounted by looking for a file I created.

if {[ file isfile "E:\donot.remove" ]} {
   set messagetext " The external disk has been turned on! "
   set buttontext "  OK  "
   image create photo infopic -file [file join $tk_library images info.gif]
} else {
   # what happens if I issue a destroy . command here, so there is null display
   set messagetext " Please turn on the external disk! "
   set buttontext " Done "
   image create photo infopic -file [file join $tk_library images warning.gif]
}

This means that the variables messagetext, buttontext and infopic vary depending on if the program can access E:\donot.remove.

wm title . {Disk Check}
wm iconname . {diskcheck}
wm geometry . 225x65+500+100
#   
# Need some version control data 
#
frame .top 
frame .bottom

# .... assign messagetext, buttontext and iconpic see above

label .top.icon -image infopic 
frame .top.f -width 50 
label .top.f.mess -text $messagetext

pack .top.f.mess -side top -fill x 
pack .top.icon .top.f -side left

button .bottom.dismiss -text $buttontext -command "exit" 

pack .bottom.dismiss
pack .top .bottom

proc exit {} 
    { destroy . }

gathers the objects and packs them into a top level window. This program is located on c:\etc, which I created and then a shortcut placed in C:\Documents and Settings\All Users\Start Menu\Programs\Startup

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.