Page 1 of 1 1
Topic Options
#123877 - 2004-07-26 11:43 AM Copyng a shortcut
Phobos Offline
Fresh Scripter

Registered: 2002-11-05
Posts: 7
Hi I have used the search function and looked through the forum but couldn't find the answer to my question.

My problem is I need to place a Word file into everyone's start menu. So I wrote a simple script that works fine. Then I created a shortcut to the file and tried to insert that but the script wouldn't copy the shortcut for some reason.

Is Kixtart able to copy and paste shortcuts or do I need to add something else to the script?

Code:
 COPY "\\SERVER\Manuals\Quality manual\Quality Manual.doc" "C:\Documents and Settings\%username%\Start Menu\Programs\Quality Manual" 



That is the code, any help would be greatly appreciated

Top
#123878 - 2004-07-26 11:50 AM Re: Copyng a shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
as a quickie reply, obviously you are not copying shortcut but the word-document itself.
shortcuts have .lnk as extension.
_________________________
!

download KiXnet

Top
#123879 - 2004-07-26 11:55 AM Re: Copyng a shortcut
Phobos Offline
Fresh Scripter

Registered: 2002-11-05
Posts: 7
I created a shortcut to the word file and it is the shortcut that I am trying to copy.

So the file is a word shortcut file.

Top
#123880 - 2004-07-26 12:01 PM Re: Copyng a shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it's not.
shortcuts don't end with .doc
it's useless to argue.

append the .lnk after your .doc (so it becames .doc.lnk) and it will work fine.
_________________________
!

download KiXnet

Top
#123881 - 2004-07-26 12:14 PM Re: Copyng a shortcut
Phobos Offline
Fresh Scripter

Registered: 2002-11-05
Posts: 7
Sorry if it sounded like I was arguing, and thanks for your advice it worked a treat.
Top
#123882 - 2004-07-26 12:23 PM Re: Copyng a shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
nah...
at this time of week everything sounds little weird

good to hear you got it working.
btw, I suggest (if you do admin work) you to disable the file-extension hide-settings.
they can be pretty painfull in these kinda situations.
_________________________
!

download KiXnet

Top
#123883 - 2004-07-26 02:48 PM Re: Copyng a shortcut
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Why not use the WSHShortCut() UDF?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#123884 - 2004-07-26 02:51 PM Re: Copyng a shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
easier to just copy the needed lnk's than create them.
_________________________
!

download KiXnet

Top
#123885 - 2004-07-26 02:57 PM Re: Copyng a shortcut
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
You are right with one or two of them, but if you have a bunch of shortcuts, why not use the UDF?

Kent
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#123886 - 2004-07-26 03:05 PM Re: Copyng a shortcut
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, what more you have them, that better it is not to use it.
say, you have 100 of those, you get 100 times the call line to the udf, it 100 times creates the file and so on.

with direct copy, it's just one copy action and you are done with it.
k, you may have less network traffic when creating them but you loose also time then.
_________________________
!

download KiXnet

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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.09 seconds in which 0.061 seconds were spent on a total of 12 queries. Zlib compression enabled.

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