|
|
|||||||
Hello All, I am in need of some help from you good people. I am trying to add addresses to the IE favourites via kix to the users profile when they login. Since, its possible to lock down the proxy address, I assuming this should be possible too. I would be grateful for assistance on this issue. Many thanks in advance. regards, Af. |
||||||||
|
|
|||||||
there are many ways to do this: copy the shortcut in from a network share create the new shortcut in place see WSHShortcut()in the UDF forum for the 'create' method See fnAllSpecialFolders() for a method of determining the destination folder |
||||||||
|
|
|||||||
I had a look at the UDF forum. I want to achieve something like the following in the All users\favourites folder. wshShortcut("KiXtart Web Page","http://www.kixtart.org") I know I'm being stupid, but I'm still not quite sure how the code works. Do you have a simple example of what the code would look like to create the above shortcut and place it in the All users\favourites folder. Also do I need to do anything extra to ensure the WSH function is working? I am using Kix 4.02 Many thanks for your assistance. Regards, AF. |
||||||||
|
|
|||||||
Please read the FAQ Forum on how to use UDFs and read the UDF header for its functionality. The UDF header contains specific instruction on how to use it and illustrates it via an example. The Favorites folder contains shortcuts with an .URL entension. You might also want to consider updating kiXtart to v4.21. For proxy settings see for example the SetProxy() UDF. |
||||||||
|
|
|||||||
an other solution is to create all the shortcuts on your station and then copy them to a shared place. in your kix script, you copy theses files to the user profile. I use these solution to set a common favorite subdir in the user favorites menu. with the script below, I create the "your favorite" subdir with all favorites organized in subdirs. When the subdirs are ready, I use robocopy to update workstation. Copy is done the first time and then, only modified or added shortcut are copied code:with the sample ini file below, I list the shortcut to be createdbreak on code:section name is the relative path name[subdir 1] key is the url value is the description (the name of the shortcut file |
||||||||
|
|
|||||||
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. |
||||||||
|
|
|||||||
kix will do that just fine. use enumdir() to get an array of all the filename.url in your favorite folder code:$folder=readvalue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders','Favorites') |
||||||||
|
|
|||||||
The reson why the codes most likely look overly complicated is that we normally write rather generic code with lots of error checks. However, the UDFs are all well tested, thus one only needs to copy them and use them according to their headers. |
||||||||
|
|
|||||||
The reason why the codes most likely look overly complicated is that we normally write rather generic code with lots of error checks. However, the UDFs are all well tested, thus one only needs to copy them and use them according to their headers. [ 25. July 2003, 16:32: Message edited by: sealeopard ] |
||||||||
|
|
|||||||
I don't think newbies realize that UDFs should be just taken 'as-is' and do not require modification. They take one look at it, panic when the cannot understand all the logic, and hit the back button. |