Adding a Group Membership Based Shortcut to a Windows Desktop Upon Login

Management, Programming  Tagged , , , No Comments »
Posted by Jeff Knapp

(That's a wordy title, isn't it?)

Had an issue with a client who needed to drop a shortcut to a Remote Desktop connection on certain desktops based upon their membership in a group.

A little vbscripting, and we got it done. It's pretty simple. (You can cut and paste the script below. Change the variables to suit your environment. Word wrapping on the screen shouldn't carry over to your editing tool of choice -- mine is TextPad.)

Option Explicit
'initialize our variables

Dim objUser, CurrentUser
Dim strGroup
Dim wShell
Dim strDesktop, objFSO
Dim link, GroupName

' Init our objects
Set wShell = CreateObject("WScript.Shell")
Set objFSO = CreateObject("Scripting.FileSystemObject")

Set objUser = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & objUser.UserName)

'This is the magic... our group membership
strGroup = LCase(Join(CurrentUser.MemberOf))

' logic testing
If InStr(strGroup, lcase(GroupName)) Then

' get the desktop folder path. this works for all locations
' redirected folders, etc.

strDesktop = WShell.SpecialFolders("Desktop")

' now we create our Shortcut object, and give it a name
Set link = wShell.CreateShortcut(strDesktop & "\Connect to TermServer.lnk")

' set the location where you store the file on the server
link.TargetPath = "\\fileserver\path\server.rdp"

' and we have to save it to make it stick.
link.Save

End If

WScript.Quit

Easy peasy.

So then, I add the script to a domain level Group Policy object I have called, logically enough, "Login Scripts" and it runs on each login, making sure our little icon is where it belongs.

Programs We Like: Artweaver

Productivity  Tagged , No Comments »
Posted by Jeff Knapp

I'm a HUGE fan of Photoshop, but when I have lot of programs open and am running low on memory, it's sometimes tough to justify the long startup time to do a quick edit or convert something to JPG.

I stumbled upon Artweaver as a freeware equivalent of Photoshop. It doesn't have everything PS has, but it has enough to do the job - quick crops, resizing, conversion between formats, and it's free. Wins all around.

The nicest part of the program is that it's interface is a very close match to PS, so it's simple to transition from one to the other. The menu choices were all in the same place.

It reads all sorts of file formats (including PSD), it handles layers and offers a plug-in architecture.

If you're looking for a quick and powerful editor for when PS is overkill, you could do a lot worse.


WordPress Theme & Icons by N.Design Studio. WPMU Theme pack by WPMU-DEV.
Entries RSS Comments RSS Log in