Updating a desktop shortcut.

Crilen007

Uhm, Title... *shrug*
Local time
Today, 00:06
Joined
Jun 13, 2003
Messages
531
Every user has a shortcut on their desktop, is there an easy way to update it using VBA? (they have a shortcut to a database updater (which is VBA), but the shortcut needs to be moved. I don't want to have to go to each computer and update it. Any way to do this?
 
Is this a one time problem or will it happen over and over?

kh
 
One time thing.

Each user has a shortcut to a VBA program on their desktop, which links to the program on the file server. I did this incase I need to update the program without having to go to each station. So I want to place a shortcut on the program to allow them to update the shortcut.

If that made any sence.
 
Hum.. If the vba program is on the local computer then I think you're up the creek...

Otherwise, if the vba program is on the server I guess you could point it to the new program...

kh
 
Last edited:
The program is on the server. But its moving a to a new server.

So right now both servers are on. I just need to make the shortcut on the users desktop point to the new one. I thought about having the user open the current program, then they click "update shortcut", it tells them to erase the current one. then they press OK to copy or create a new one.
 
Actualy, I think you could do a pc of vba that would copy the new shortcut to their desktop. I suppose you could put a pc code in the existing app that would do this but I'm really not up on it...

Maybe Pat or SJ will happen by after while with a suggestion...

kh
 
I am not Pat of SJ but I do exactly this in my apps to keep the users shortcuts for my apps up to date. Assuming everybody's shortcut is in the same place you can easily do this using the FileCopy function.

Place the updated shortcut somewhere on the server where everybody has access to it. This command will basically copy the shortcut from the server and overwrite the users shortcut. If the users have Windows XP is gets trickier. I prefer to use the All Users directory for Windows XP.

Windows 9x method...
FileCopy "\\Server\Partition\Directory\Your Shortcut.lnk", "C:\Windows\Desktop\Your Shortcut.lnk"

Windows XP method...
FileCopy "\\Server\Partition\Directory\Your Shortcut.lnk", "C:\Documents and Settings\All Users\Desktop\Your Shortcut.lnk"
 
Hum...

Then you could get the nt username if the desk top is deeper where you have profiles etc... Cool.

kh

("I am not Pat of SJ..." - sorry)
 
KenHigg said:
Then you could get the nt username if the desk top is deeper where you have profiles etc... Cool.
Yes.

FileCopy "\\Server\Partition\Directory\Your Shortcut.lnk", "C:\Documents and Settings\" & Environ("UserName") & "\Desktop\Your Shortcut.lnk"
 

Users who are viewing this thread

Back
Top Bottom