#127948 - 2004-10-15 03:06 AM
Re: if ingroup, vbs, drive mapping
|
ShaneEP
MM club member
   
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
|
Heres some sample code for you to check out. All in Kix as Les mentioned. The wshshortcut udf came straight from the udf forum here on the board.
Code:
If InGroup("GroupA")
Use G: /Delete /Persistent
Use G: "\\server\share$\groupA"
WshShortCut("%userprofile%\desktop\G Drive.lnk","G:\")
Endif
If InGroup("GroupB")
Use H: /Delete /Persistent
Use H: "\\server\share$\groupB"
WshShortCut("%userprofile%\desktop\H Drive.lnk","H:\")
Endif
function WshShortCut($path,$targetpath,optional $arguments,optional
$startdir,optional $iconpath,optional $style)
dim $shell,$shortcut
$shell=createobject("wscript.shell")
if $shell
$shortcut=$shell.createshortcut($path)
if $shortcut
$shortcut.targetpath=$targetpath
if $arguments
$shortcut.arguments=$arguments
endif
if $startdir
$shortcut.workingdirectory=$startdir
endif
if $iconpath
$shortcut.iconlocation=$iconpath
endif
if $style
$shortcut.windowstyle=$style
endif
$shortcut.save
$shortcut=0
endif
$shell=0
endif
exit @error
endfunction
|
|
Top
|
|
|
|
if ingroup, vbs, drive mapping
|
JoS
|
2004-10-15 01:50 AM
|
Re: if ingroup, vbs, drive mapping
|
Les
|
2004-10-15 02:02 AM
|
Re: if ingroup, vbs, drive mapping
|
JoS
|
2004-10-15 02:28 AM
|
Re: if ingroup, vbs, drive mapping
|
Les
|
2004-10-15 02:51 AM
|
Re: if ingroup, vbs, drive mapping
|
Les
|
2004-10-15 02:56 AM
|
Re: if ingroup, vbs, drive mapping
|
JoS
|
2004-10-15 03:03 AM
|
Re: if ingroup, vbs, drive mapping
|
ShaneEP
|
2004-10-15 03:06 AM
|
Re: if ingroup, vbs, drive mapping
|
Sealeopard
|
2004-10-16 02:06 AM
|
Re: if ingroup, vbs, drive mapping
|
JoS
|
2004-10-20 08:24 PM
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1077 anonymous users online.
|
|
|