Solved

Creating Program groups in Program Manager or Start Menu

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article shows how to make a Windows 7 gadget that extends its U/I with a flyout panel -- a window that pops out next to the gadget.  The example gadget shows several additional techniques:  How to automatically resize a gadget or flyout panel t…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…

839 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