Solved

Creating Program groups in Program Manager or Start Menu

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

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…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

785 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