Solved

Creating Program groups in Program Manager or Start Menu

Posted on 1997-07-19
2
221 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
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
As more and more people are shifting to the latest .Net frameworks, the windows presentation framework is gaining importance by the day. Many people are now turning to WPF controls to provide a rich user experience. I have been using WPF controls fo…
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now