|
Thanks guys for all your help. All the code I've seen so far seems to be very long and overly complicated for what I wanted to acheive, So for lesser mortals like me, here is the very basic code that I used to create the shortcuts on the users favourites folder.
Note: for some reason VBScript does not run, so instead I used Java script.
Shell = new ActiveXObject("WScript.Shell"); DesktopPath = Shell.SpecialFolders("Favorites"); link = Shell.CreateShortcut(DesktopPath + "\\BBC.lnk"); link.Description = "html"; link.IconLocation = "C:\\WINNT\\system32\\url.dll"; link.TargetPath = "http://news.bbc.co.uk"; link.WindowStyle = 3; link.WorkingDirectory = "c:\\winnt"; link.Save();
The next step for me is to check if any existing shortcuts in the favourites folder contain the same URL. If they do to delete/rename them.
The deleting/renaming is to ensure all users have exactly the same shortcut name for any given URL.
As always, any help will be greatly appreciated.
|