View Single Post
Old 05-07-2008, 10:46   #9
Jon T
cf.mega poster
 
Join Date: Jun 2003
Location: Mansfield, Notts
Age: 45
Services: Virgin Media Telephone and 100Mb broadband, Sky Q
Posts: 1,994
Jon T has reached the bronze age
Jon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze ageJon T has reached the bronze age
Re: SBS2003 push shortcuts to users

Quote:
Originally Posted by Steve-o||[^] View Post
/votes CreateShortcut() via logon script

Code:
//-- straight copy-paste from my script repo..
<job>
<script language="JScript">

// roll the dice!
var ws		= WScript.CreateObject("WScript.Shell");
var desktop	= ws.SpecialFolders("Desktop");

// shortcut details
var server	= "blue";
var share	= "public\\netinst";	//- escape backslashes -- \ = \\
var label	= "Public Network Installations";

// create the shortcut!
var scut			= ws.CreateShortcut(desktop + "\\"+ label +".lnk");
scut.TargetPath		= "\\\\"+ server +"\\"+ share;
scut.IconLocation	= "%SYSTEMROOT%\\system32\\shell32.dll,85";	//- Network share icon
scut.Save()

</script>
</job>

http://msdn.microsoft.com/en-us/libr...ys(VS.85).aspx
Yes, there are many ways of achieving this, another way would be to package the shortcut into an .msi and deploy through group policy, but at the end of the day, why bother when you can do it all with one line in a logon script.
Jon T is offline   Reply With Quote