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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create nethood shortcuts with group membership @ logon

Status
Not open for further replies.

treay

MIS
Apr 27, 2004
3
US
I want to map drives without a drive letter in Network places. I have
the two parts (removing and adding shortcuts in nethood, but cannot get
the rights checker to work with them. Take a look at what I have...


' Clear all entries in the nethood folder
Const NETHOOD = &H13&
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(NETHOOD)
Set objFolderItem = objFolder.Self
strPath = objFolderItem.Path & "\*.*"
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile(strPath)
*******
' create nethood shortcuts
Const NETHOOD = &H13&
Set objWSHShell = CreateObject("Wscript.Shell")
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(NETHOOD)
Set objFolderItem = objFolder.Self
strNetHood = objFolderItem.Path
strShortcutName = "Test Folder"
strShortcutPath = "\\testserver\p15141"
Set objShortcut = objWSHShell.CreateShortcut _
(strNetHood & "\" & strShortcutName & ".lnk")
objShortcut.TargetPath = strShortcutPath
objShortcut.Save


What I WANT to do is associate these with group
permissions. I need to create about 300 shortcuts for projects, departments, proposals and so on. Groups are nested and in a w2k3 domain.The clients are w2k and XP. The share names are \\server1\share1 standard shares on w2k and w2k3 servers.


Thanks in advance,


 
couple of options i can think of
1. have an ini file listing
<groupname>=<scutname>;<scutpath>
get users groupmembership+nested in memory
compare against ini file and action appropriately

2. create your security groups with a naming convention
_SCUT_<group name>
put the <scutname>;<scutpath> string into some property of the security group.... .Description perhaps
have your logon script loop through groups, when it finds one with _SCUT it grabd the .Description and actions accordingly
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top