We help IT Professionals succeed at work.

Desktop Shortcuts

missle
missle asked
on
816 Views
Last Modified: 2013-12-03
We (Rockwell) have created a new version of a previously existing application,which we also created.  The problem that this new version is in a new location on the client's hard drive.  

I wondering if there is a way to check if a user has placed a shortcut of the old App on his/her desktop.  If they have I would like to make it point to the new App, or delete it and put a new one in its place.

I has been suggested that "A shortcut on the desktop is mearly a .LNK file in the c:\windows\dektop directory. Open each of the .LNK files in that directory and check to see if they point to your program. "

The problem with that is. What if the computer has mutilple users logging in.  For example, I login under two different names on our network depending upon what task I want to perform.  The reason is that one of my logins has access that the other doesn't.  Anyway, on my computer in c:\windows\desktop it shows the Desktop of the the default login, not the Desktop of either of my two logins.  I think It must be done threw windows api, but I just don't know the commands.  


Thanks
Comment
Watch Question

Author

Commented:
Edited text of question

Author

Commented:
Edited text of question

Commented:
Is this for WinNT4?  Win95?  Both?

Under both WinNT4, each user has their own profile.  This will also be true under Win95 IF the option has been set to use this capability.

I think I can help you through this but I need a little more info on the platforms you expect to live on.

Commented:
Also, what environment do you expect to implement the solution in?  VC++, VB, C?

Author

Commented:
This is for Windows 95, I would like to assume that the feature allowing mutiple users is checked.


I was going to implement the solution in Visual Basic.

Thanks

Commented:
You may have misunderstood one statement I made.  Under Win95, you can always have multiple users login and each will get their own password.  However, there are options which can be set to determine whether all users use the same settings or use different preferences and desktop settings.  Plus, options are available to include/exclude: Network Neighborhood settings, desktop icons, start menu entries, and program groups.

So, I don't believe you can assume that a Win95 workstation is set to use any or all of these options.  Although you can _determine_ which of the options is being used.

Anyway, I'll do some checking and get back to you.

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
After re-thinking this, there is also the possibility the user has manually created a short-cut somewhere else for who knows why.  If you desired to catch them (though you could probably ignore these) you would need to search the entire disk space.

Author

Commented:
Isn't there a way to  communicate with the windows shell using

DDEExecute and DDEchannel

to get this done?  There must be.  I can use these commands to add, edit, and delete things to the start menu; why not the desktop.  For example

DDEExecute DDEchannel, "[CreateGroup .. ]"

creates a new group to the start menu, and

DDEExecute DDEchannel, "[AddItem

adds an item.

thanks,
missle

Commented:
DDE works via Program Manager.  There are a couple of issues:  1) if the user does not use Program Manager, they may have removed it (I know many who have), 2) Program Manager will only know about the things created within it.  It only knows about groups and items created from within itself.  It does not contain a complete, matching set of program groups or items for all start menu short-cut items.  Yes, you can use DDE to ReplaceItems but only the ones of which Program Manager is aware.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.