Reset a shortcuts properties 
Author Message
 Reset a shortcuts properties

This is a good question. I want to reset a short cut's
properties how do you do this? I can create the object
fine but need to change the target path after it's been
created. How do you bind to the windows shortcut and
change it's properties?


Tue, 06 Jul 2004 02:52:55 GMT  
 Reset a shortcuts properties
Using WshShell.CreateShortcut() with the path to an existing shortcut gives you a WshShortcut (.lnk) or a WshUrlShortcut (.url) object depending on the extension of the file name passed.  You can modify the properties and then call the Save method.

--
Michael Harris
Microsoft.MVP.Scripting
--

Quote:

> This is a good question. I want to reset a short cut's
> properties how do you do this? I can create the object
> fine but need to change the target path after it's been
> created. How do you bind to the windows shortcut and
> change it's properties?



Tue, 06 Jul 2004 04:56:20 GMT  
 Reset a shortcuts properties
I'm doing this now and trying to figure out the best way to install the icon
file on a client's desktop.  I give the client users the url link to the vbs
file located on an ftp server.  They choose Open vs Download.  This puts the
shortcut on their client desktop.

Where's the best place to place the icon file centrally. I had wanted to
place it in the Images directory of WWWRoot so i could just include it in
the setup msi package.  Not sure if this is gonna work though.

Any tried and true methods for grabbing the icon and assigning it to the
client the script just created the shortcut for?

Harry



Using WshShell.CreateShortcut() with the path to an existing shortcut gives
you a WshShortcut (.lnk) or a WshUrlShortcut (.url) object depending on the
extension of the file name passed.  You can modify the properties and then
call the Save method.

--
Michael Harris
Microsoft.MVP.Scripting
--


Quote:
> This is a good question. I want to reset a short cut's
> properties how do you do this? I can create the object
> fine but need to change the target path after it's been
> created. How do you bind to the windows shortcut and
> change it's properties?



Tue, 06 Jul 2004 06:18:36 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to cacel a forms reset button using MsgBox properties

2. How to make a shortcut with these properties set

3. View properties of an existing shortcut

4. Shortcut Creation Properties

5. WSH and Shortcut Properties

6. Getting shortcut properties

7. How to make a shortcut with these properties set

8. Properties For Shortcuts?

9. Shortcut Properties Help

10. Shortcut TargetPath property?

11. How to make a shortcut with these properties set

12. Folder Shortcut -vs- Application Shortcut

 

 
Powered by phpBB® Forum Software