?
Solved

Desktop Shortcuts

Posted on 1997-04-30
10
Medium Priority
?
779 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
0
Comment
Question by:missle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
10 Comments
 

Author Comment

by:missle
ID: 1397036
Edited text of question
0
 

Author Comment

by:missle
ID: 1397037
Edited text of question
0
 
LVL 1

Expert Comment

by:advapp
ID: 1397038
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.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 1

Expert Comment

by:advapp
ID: 1397039
Also, what environment do you expect to implement the solution in?  VC++, VB, C?
0
 

Author Comment

by:missle
ID: 1397040
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
0
 
LVL 1

Expert Comment

by:advapp
ID: 1397041
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.

0
 
LVL 1

Accepted Solution

by:
advapp earned 200 total points
ID: 1397042
Ok, here's one approach.  It is not necessarily elegant but I'm confident that it will work.

On Win95 you can locate all *.LNK in and under:
   $Windir\Start Menu
   $Windir\Profiles

On NT, search for all *.LNK in and under:
%SystemRoot%\Profiles

Any shortcut created by a user will be found in either of these folders or their children.  Once you've located all the shortcuts, you can narrow it down to only those which point to the app in question.  Prompt the user (or not) to change them and you're done.

0
 
LVL 1

Expert Comment

by:advapp
ID: 1397043
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.
0
 

Author Comment

by:missle
ID: 1397044
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
0
 
LVL 1

Expert Comment

by:advapp
ID: 1397045
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.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
If you have ever found yourself doing a repetitive action with the mouse and keyboard, and if you have even a little programming experience, there is a good chance that you can use a text editor to whip together a sort of macro to automate the proce…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question