Page 1 of 1 1
Topic Options
#145626 - 2005-08-15 09:07 PM howto modify shortcut properties
hywaydave Offline
Fresh Scripter

Registered: 2005-07-20
Posts: 26
Is there a way I can create a kixtart script to modify the "target" and "startin" property of a desktop shortcut?
Top
#145627 - 2005-08-15 09:11 PM Re: howto modify shortcut properties
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
Maybe this UDF can help you out...
WshShortCut() - Create shortcuts programatically with WSH

or maybe this one is even better...

EditShortCut() - read and change the target of a shortcut or delete it


Edited by Co (2005-08-15 09:15 PM)
_________________________
Co


Top
#145628 - 2005-08-15 09:59 PM Re: howto modify shortcut properties
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
A solution using wshshortcut can be found here.
http://www.kixtart.org/ubbthreads/showflat.php?Cat=0&Number=144347&an=0&page=1#144347
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#145629 - 2005-08-15 11:09 PM Re: howto modify shortcut properties
hywaydave Offline
Fresh Scripter

Registered: 2005-07-20
Posts: 26
Thanks,

how do I include a UDF in with the rest of my script?

Top
#145630 - 2005-08-15 11:17 PM Re: howto modify shortcut properties
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Just copy the UDF code into your script at the bottom. Or make a separate file for this UDF and call it like done in the example above.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#145631 - 2005-08-16 03:10 PM Re: howto modify shortcut properties
hywaydave Offline
Fresh Scripter

Registered: 2005-07-20
Posts: 26
OK, I'm not totally understanding this WshShortcut thing. I have a desktop shortcut already on my user's workstations that has the "target" path pointing to t:\program and the "startin" path pointing to t:\location. What I want to do is change the t: to z: in both locations. Can someone help me out? Thanks.
Top
#145632 - 2005-08-16 03:28 PM Re: howto modify shortcut properties
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
just delete it and make a new one
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#145633 - 2005-08-16 03:30 PM Re: howto modify shortcut properties
hywaydave Offline
Fresh Scripter

Registered: 2005-07-20
Posts: 26
Delete what? I don't have a script for this right now but I would like to use one. I'm not following this WshShortcut deal.
Top
#145634 - 2005-08-16 04:30 PM Re: howto modify shortcut properties
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
personally, i'd just create a new shortcut manually that points to the correct drive and then just copy it to your users' desktops replacing the current one.
Top
#145635 - 2005-08-16 06:27 PM Re: howto modify shortcut properties
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
WSHShortcut is for creating new shortcuts. Just deleting the current shortcut and creating a new one with WSHShortcut would be the safest way.

Like Co said EditShortCut() - read and change the target of a shortcut or delete it this can do what you want.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
Page 1 of 1 1


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

Who's Online
0 registered and 476 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.063 seconds in which 0.026 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