Script help needed with conditionals and Registry key
- From: Dustin <clodhoppers18@xxxxxxxxx>
- Date: Fri, 18 Jan 2008 07:37:41 -0800 (PST)
I need a vbs/wmi or bat script to check to see if the following
registry key is set to U:\%username%
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell
Folders\Personal
It is set as a REG_EXPAND_SZ entry into the registry
The personal key defines the location of the My Documents folder.
We have a logon script that maps the U:\ drive to the \Users folders
on a file server on the network.
We are wanting to have the My Documents shortcut in the Start Menu in
Windows XP map to the U:\%username% folder
(replace %username% with the person's user name, as everyone that has
a log on has a personal folder on the U:\ drive)
We will include this in the log on script for one month, and since it
is included for one month, we will need to have an if else statement
check to see if it is set to what we need it to be.
If it is set to the U:\%username% then no changes need to be made
If it is NOT set to the U:\%username% then the script needs to do the
following:
1)record in memory the current setting of the Personal registry key
2)copy the data from the current folder to the U:\%username%
3)edit the Personal registry key to point to the U:\%username%
4) delete the old folder.
The reason we are wanting to do this is rather straightforward:
1) we do full network backups and only the documents saved to the file
server are backed up
2) when a computer crashes, we will not have lost any user's
documents, etc.
3) its easier to secure our data on the server than on a multitude of
PCs
I am not sure how to go about doing all this, as I am somewhat new to
registry editng in scripts... Comments/Scripts/Recommendations are
certainly welcome.
Thanks in advance,
Dustin
.
- Prev by Date: Re: Welcome screen script?
- Next by Date: EnumLocalGroup.vbs - only want logon account name and description fields
- Previous by thread: Re: Welcome screen script?
- Next by thread: EnumLocalGroup.vbs - only want logon account name and description fields
- Index(es):
Relevant Pages
|