Page 1 of 1 1
Topic Options
#172794 - 2007-01-15 07:05 PM how to add an internet shortuct to the users desktop
Alice Offline
Lurker

Registered: 2005-10-22
Posts: 4
Hi all,

New to kix here and pulling my hair out.
I want to add an internet shortcut to all the users' desktops (domain users) when they log in.
The internet shortcut is on \\$server2\shortcuts\pmworx (extension .url??)
Any and all help will be appreciated.
Thanks.

Top
#172798 - 2007-01-15 07:49 PM Re: how to add an internet shortuct to the users desktop [Re: Alice]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
This should be able to do the task for you.


wshShortcut() - v1.3 - Create File & Web Shortcuts
http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=84115

.

Top
#172799 - 2007-01-15 08:28 PM Re: how to add an internet shortuct to the users desktop [Re: NTDOC]
Alice Offline
Lurker

Registered: 2005-10-22
Posts: 4
I found that article but it is all greek to me.
I can't get it to work as I don't know what I'm doing with it.
Please help.
Thanks.

Top
#172806 - 2007-01-16 03:11 AM Re: how to add an internet shortuct to the users desktop [Re: Alice]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
What version of KiXtart are you using?

@KIX in a script should show it, or do file properties on it to find the version of either KIX32.EXE or WKIX32.EXE


Then
1. What is the exact location you want the URL to point to ?
2. What do you want it to say for the name of the shortcut ?

.

Top
#172810 - 2007-01-16 04:40 AM Re: how to add an internet shortuct to the users desktop [Re: NTDOC]
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
And read the "How to use UDFs" FAQ in the FAQ Forum.
_________________________
There are two types of vessels, submarines and targets.

Top
#172832 - 2007-01-16 04:11 PM Re: how to add an internet shortuct to the users desktop [Re: NTDOC]
Alice Offline
Lurker

Registered: 2005-10-22
Posts: 4
Version 4.53.0.0

currently have a script that is mapping drives.

Exact location: \\$server2\shortcuts\worx.url

Need to call the Shortcut WORX

Need to put this Internet Shortcut on all the desktops.

Also need a program shorcut placed on two desktops - 2 people that belong to a specific 'group'

location of shortcut \\$server2\shortcuts\pmworx.exe
Need to call the shortcut PMWORX

I'll re-read that faq again and see if I understand it any better. I must be missing a basic concept cuz it sounds all greek to me.

Thanks so much for your help!

Top
#172834 - 2007-01-16 04:34 PM Re: how to add an internet shortuct to the users desktop [Re: Alice]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
wshShortcut() creates shortcuts.
If I understand well, you just want to copy the existing shortcuts \\$server2\shortcuts\worx.url.lnk and \\$server2\shortcuts\pmworx.exe.lnk to the users desktops and you want to rename them to worx.lnk and pmworx.lnk.

Top
#172836 - 2007-01-16 05:16 PM Re: how to add an internet shortuct to the users desktop [Re: Witto]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Maybe your goal is something like this:
Code:
If NOT @LOGONMODE
	Break On
Else
	Break Off
EndIf
Dim $RC
$RC=SetOption("Explicit", "On")
$RC=SetOption("NoMacrosInStrings", "On")
$RC=SetOption("NoVarsInStrings", "On")
$RC=SetOption("WrapAtEOL", "On")

Dim $Desktop
$Desktop = ReadValue("HKCU\Software\Microsoft\Windows\Currentversion\Explorer\User Shell Folders","Desktop")
Copy "\\$server2\shortcuts\worx.url.lnk" $Desktop + "\WORX.lnk"
If InGroup("SpecificGroup")
	Copy "\\$server2\shortcuts\pmworx.exe.lnk" $Desktop + "\PMWORX.lnk"
EndIf

Top
#172839 - 2007-01-16 06:49 PM Re: how to add an internet shortuct to the users desktop [Re: Witto]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Witto,
Is that supposed to be .url or .lnk? Waddup with the double extension and trying to make a .url into a .lnk?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#172843 - 2007-01-16 08:53 PM Re: how to add an internet shortuct to the users desktop [Re: Les]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Alice says he/she got 2 shortcuts at location \\$server2\shortcuts\. So I presume both files do have an .lnk extension. The .lnk extension is always hidden in windows explorer.
I am just presuming. Alice has to confirm if I am right. I think it is about shortcuts and their exact names are worx.url.lnk and pmworx.url.lnk

Top
#172850 - 2007-01-16 10:11 PM Re: how to add an internet shortuct to the users desktop [Re: Witto]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
If it is an internet shortcut, it ends in .url while regular shortcuts end in .lnk but .url.lnk is not something one normally sees.
One could always open a CMD prompt and do a DIR to see what they really are.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#172852 - 2007-01-16 10:52 PM Re: how to add an internet shortuct to the users desktop [Re: Les]
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
You are right. Shortcuts referring to an URL end with .URL, not .LNK
Top
#172866 - 2007-01-17 02:36 AM Re: how to add an internet shortuct to the users desktop [Re: Witto]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
It might be better to create them rather then copying them to bypass the File System Tracking that will search for the system that originally created the file the first time which ends up with an initial slow launch.
Top
#172868 - 2007-01-17 03:39 AM Re: how to add an internet shortuct to the users desktop [Re: NTDOC]
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
While that may be true for .lnk shortcuts, AFAIK .url links don't have tracking.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#172869 - 2007-01-17 03:52 AM Re: how to add an internet shortuct to the users desktop [Re: Les]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11631
Loc: CA
@LES
Basic testing would seem to confirm your comment Les.


@Alice
Were you able to get one of the suggestions to work ?


.

Top
#173946 - 2007-02-15 05:54 PM Re: how to add an internet shortuct to the users desktop [Re: Witto]
ClarkKent Offline
Fresh Scripter

Registered: 2006-07-28
Posts: 5
Hello, I'm trying to do the same thing. I need only one shortcut added to the users desktop. My code is below but I can't get it to work. Does this look right to you? I'm a NewB and using a logon batch file to start Kix. Below is my logon.bat incase that's wrong too.

Logon.bat
@ECHO OFF
%0\..\Kix32.exe

Kix Code:
If NOT @LOGONMODE
Break On
Else
Break Off
EndIf
Dim $RC
$RC=SetOption("Explicit", "On")
$RC=SetOption("NoMacrosInStrings", "On")
$RC=SetOption("NoVarsInStrings", "On")
$RC=SetOption("WrapAtEOL", "On")

Dim $Desktop
$Desktop = ReadValue("HKCU\Software\Microsoft\Windows\Currentversion\Explorer\User Shell Folders","Desktop")
Copy "\\cfg\Support\Shortcuts\Gibbs on charlie.lnk" $Desktop + "\Gibbs.lnk"
; If InGroup("SpecificGroup")
; Copy "\\$server2\shortcuts\pmworx.exe.lnk" $Desktop + "\PMWORX.lnk"
EndIf

Top
#173948 - 2007-02-15 06:21 PM Re: how to add an internet shortuct to the users desktop [Re: ClarkKent]
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Put the following statements after your copy and advise.

?"ERROR "+@ERROR+" - "+@SERROR
?"Press any key to continue..." GET$

Top
#173952 - 2007-02-15 07:05 PM Re: how to add an internet shortuct to the users desktop [Re: Shawn]
ClarkKent Offline
Fresh Scripter

Registered: 2006-07-28
Posts: 5
?? Don't understand what your sayiing.......sorry.
Top
#173957 - 2007-02-15 10:39 PM Re: how to add an internet shortuct to the users desktop [Re: ClarkKent]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
 Originally Posted By: ClarkKent
?? Don't understand what your saying.......sorry.


If you put the lines Shanw posted directly after the copy command they will show you the error so you can see where and why it doesn't work.

It can be done a lot simpler. Like this.

 Code:
If NOT @LOGONMODE
	Break On
Else
	Break Off
EndIf

$rc = wshShortcut("Your app name","path to the executable en executable name you want to let the shortcut point to")


You should add the wshShortcut UDF to the script. There is no need to change the wshShortcut code because it's a UDF and it comes ready made.

wshShortcut() - v1.3 - Create File & Web Shortcuts
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.073 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org