Solved

Creating Program groups in Program Manager or Start Menu

Posted on 1997-07-19
2
227 Views
Last Modified: 2013-12-03
Hello,

I'm writing an program which one of its functions is to install several programs on the harddisk. One problem I face is to make a program group and several items inside the group in Program Manager of Windows 3.1 (or in the Start menu of Win95). I can't use the setup wizard of Toolbook
because there are some other functionalities needed beside installing programs, and the setup wizard can't help. Could anyone show me how this can be done?

Thanks very much.
0
Comment
Question by:leechunkwok
[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
2 Comments
 
LVL 1

Expert Comment

by:Odie
ID: 1401303

// C code for creating new folders in Win95

LPITEMIDLIST pidl;
char szProgramPath[ MAX_PATH];

if ( SUCCEEDED( SHGetSpecialFolderLocation( NULL, CSIDL_PROGRAMS, &pidl) ) )
{
 SHGetPathFromIDList(pidl, szProgramPath);

 // Here you can work changing directory (program group) names, creating new etc.


 SHChangeNotify( SHCNE_UPDATEDIR, SHCNF_FLUSH | SHCNF_PATH, (PLVOID) szProgramPath, 0);
 CoTaskFreeMem( (LPVOID) pidl );
}



// C code for creating new links in Win95

IShellLink *ishlnk;
IPersistFile *ipersist;

if ( SUCCEEDED( CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, &ishlnk))
{
 // Here you may call the IShellLink methods (see help file)
 ishlnk->vtable->SetDescription(ishlnk, "Test Link"); // Shortcut name
 ishlnk->vtable->SetPath( ishlnk, "C:\\COMMAND.COM"); // Shortcut to command.com
 // ... etc.

 // The ShellLink object is now just created in mem - to store it use IPersistFile
 // ishlnk->vtable->QueryInterface(ishlnk, IID_IShellLink, &ipersist );
 // etc.

 // Always release the interface
 ishlnk->vtable->release(ishlnk);
}

Note that I haven't been able to try it out - I'm currently out of C-Compiler.  I think this might help you in the right direction.
0
 
LVL 4

Accepted Solution

by:
AVaulin earned 100 total points
ID: 1401304
There is way to do what you want: use DDE.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
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…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

707 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