Novell Cool Solutions

Removing Icons from AllUsersDesktop



By:

November 19, 2008 11:39 am

Reads:5,194

Comments:0

Score:Unrated

Print/PDF

Remove Desktop Icons

If you are managing your desktops with ZENworks you may wish to have better control over icons that are placed on a users desktop from the All Users Desktop. This tip is a simple demonstration on how you can easily script deletion of files from AllUsersDesktop.

Create a bundle with a Launch Action to run a script. The script supplied here is a vbscriptand should have an extension of .vbs. The script engine should be set to %WINDIR%\system32\wscript.exe.

Click to view.

If users need additional rights to do this, as is likely, from More Options you can select run as Administrator.

The code of the script is below:

Option Explicit

Dim oShell, oSpecialFolders, oURL, oAllUsers,oFSO, OFC, file

Set oFSO = createobject("Scripting.FileSystemObject")

set oShell = createobject("WScript.shell")

Set oSpecialFolders = oShell.SpecialFolders

set oAllUsers = oFSO.GetFolder( oSpecialFolders("AllUsersDesktop") )

Set OFC = oAllUsers.Files

For Each file In OFC

 oFSO.DeleteFile(file)

Next 

WScript.quit

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.
Loading...Loading...

Tags:
Categories: Uncategorized

0

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.

Comment

RSS