Quote:
Originally Posted by Steve-o||[^]
/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.