richclever
IS-IT--Management
I have written a Vbscript that changes the My Documents folder on my Win98 Clients to the users folder on my NT4 server. This works fine except that although the properties of the folder are correct, when the user double clicks the My Documents icon on the desktop, they are still in the previous persons folder. These folders are Permission denied for all users except the logged on one and the administrator. Can any one help me so that the logged on users folder is displayed. I enclose my scipt below.
dim wshell
set wshell = wscript.createobject ("wscript.shell"
dim wshnetwork
set wshnetwork = wscript.createobject ("wscript.network"
dim username
username = wshnetwork.username
dim userpath
userpath = "\\acnetpdc\users\" + username
wshell.regwrite "HKCU\software\microsoft\windows\currentversion\explorer\user shell folders\personal", userpath
wshell.regwrite "HKCU\software\microsoft\windows\currentversion\shell folders\personal", userpath
dim exists
dim fso
set fso = createobject ("Scripting.filesystemobject"
exists = 0
dim newfolder
newfolder = "\\acnetpdc\users\" + username
if fso.FolderExists (newfolder) then
exists = 1
end if
if exists <> 1 then
fso.CreateFolder (newfolder)
end if
exists = 0
Thanks
Richard
dim wshell
set wshell = wscript.createobject ("wscript.shell"
dim wshnetwork
set wshnetwork = wscript.createobject ("wscript.network"
dim username
username = wshnetwork.username
dim userpath
userpath = "\\acnetpdc\users\" + username
wshell.regwrite "HKCU\software\microsoft\windows\currentversion\explorer\user shell folders\personal", userpath
wshell.regwrite "HKCU\software\microsoft\windows\currentversion\shell folders\personal", userpath
dim exists
dim fso
set fso = createobject ("Scripting.filesystemobject"
exists = 0
dim newfolder
newfolder = "\\acnetpdc\users\" + username
if fso.FolderExists (newfolder) then
exists = 1
end if
if exists <> 1 then
fso.CreateFolder (newfolder)
end if
exists = 0
Thanks
Richard