Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 Questions on Folder Redirection and delete desktop shortcut

Status
Not open for further replies.

faisalt

IS-IT--Management
Jan 23, 2007
16
US
Hello IT compatriots,
I have setup a group policy that redirects My Documents and Desktop folder on to network share. The problem is that when user accidently delete item (doc, shortcut) from desktop, it goes to lala land. Completely vanishes! It is neither in system's recycle bin nor in servers'. In contrast, if something is deleted from My Documents folder, it goes into recycle bin. Any Idea, why it is acting different for Desktop?
Second question is that I have deployed office 2003 using group policy and custom installation wizard. In the MST, I have specified to create desktop shortcuts for Outlook, word, powerpoint, etc. It is all working like a charm. Problem is that when user, who doesnt want anything on deskktop, try to delete an icon,they get error, 'access is denied, Make sure disk in not full or write protected and that the file is not currently in use.' Even though, from admin account, shortcuts can be deleted without a problem. What should I do so that ordinary users can delete those icons?
Thanks in advance.
-faisal
 
The file deletion is acting per design. Use ShadowCopy for the ability to restore the icons if needed.

For the ability to delete the shortcuts created by your admin install, the user will need to take ownership of the icons.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
But, how come My Documents is not acting the same way?
Can you elaborate more on ShadowCopy? How can I enable it?
Also, is there a simpler way to delete desktop shortcut from user account? I couldn't find a way to take ownership while logged in as a user.
btw, on a different note, I like to thank you for writing such wonderful scripts.
-faisal
 
To take ownership, have the user browse to the files from a UNC to the server. Right click the files, choose properties. Click security. Click advanced button. Click the owner tab and take ownership.

ShadowCopy needs to be turned on at the volume level. on the server go into My Computer. Right click a drive. Choose the ShadowCopy tab. Enable it on that screen. Then after a snapshot is made, the clients can right click a folder on that drive and choose ShadowCopy to get back previous versions of files.

I believe the difference between your desktop and my documents issue is that the MyDocs redirection still keeps a cached copy locally I believe.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Is there an easier way, so that users can delete shortcut from desktop? I gave everyone Full control to All Users\Desktop folder and that actually seems to be working.
Is there a script or registry that can beployed via group policy?

 
You can script setting the permissions using XCACLS. Download XCACLS from Microsoft, check the help file to get the command you need and if you post the steps needed via command line I can assist with making that a vbscript. You need to do the leg work first.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Thanks Mark. I am working on it right now.
 
Hi Mark,
Ok, I was able to use xcacls to change permission on all users\desktop folder. Now the question is how can I deploy this to all computer via group policy.
cscript.exe xcacls.vbs "c:\Documents and Settings\All Users\Desktop" /g Everyone:f /f /t /e /l "c:\xcacls.log"

Thanks for all the help!
 
Code:
Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("cscript.exe xcacls.vbs " & Chr(34) & "c:\Documents and Settings\All Users\Desktop" & Chr(34) & "/g Everyone:f /f /t /e /l c:\xcacls.log")

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Awesome! I am gonna test it on my virtual machine and let you know.
Thanks...
 
I tried to run the script on virtual machine, but it did not change any permission. Is there anything I am missing?
Do I need to change default scripting engine from Wscript to Cscript?
Thanks.
 
Try this:
Code:
MsgBox "starting xcacls"
Set WSHShell = CreateObject("Wscript.Shell")
WSHShell.Run ("cmd.exe /c cscript.exe xcacls.vbs " & Chr(34) & "c:\Documents and Settings\All Users\Desktop" & Chr(34) & "/g Everyone:f /f /t /e /l c:\xcacls.log")

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
No charm! Let me tell you how I am doing the test.
I am trying by copying and pasting into txt file and renaming it to .vbs. And then running it. Also, this is done from Admin account, so no issue with permission. Does XCACLS.vbs file, which I downloaded from Microsoft needs to be in the same directory?
 
I tried to run the script on the same directory as XCACLS and it is still not working. How can I incorporate UNC path in your script? Lets say '//butterfree/xcacls' is the UNC path where xcacls.vbs is located?
Thanks for quick response.
 
I think I found a better and easier solution. I went into Active Directory\computer configuration\windows settings\security settings\file system and added c:\documents and settings\all users\desktop folder and it prompted me for the permission I like to grant. There I gave everyone full control permisssion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top