How to create a program group in Start menu?

How to create a program group in Start menu?

Post by Ulrich Termath » Fri, 07 Mar 2003 21:10:17



Hello,

I've written a small installation program for my application. The
installation program copies all necessary files in a directory. Now
I would like to create a program group and some icons in the
Start menu. I think there should be some SDK functions to do
such entries. Does anyone know how to create a program group
and how to create links to some files by using the SDK?

Thanks for any hint,
Uli

 
 
 

How to create a program group in Start menu?

Post by Walter Brisco » Fri, 07 Mar 2003 23:08:38



13:10:17 in microsoft.public.platformsdk.shell, Ulrich Termathe

Quote:>Hello,

>I've written a small installation program for my application. The
>installation program copies all necessary files in a directory. Now
>I would like to create a program group and some icons in the
>Start menu. I think there should be some SDK functions to do
>such entries. Does anyone know how to create a program group
>and how to create links to some files by using the SDK?

Use the following to search the SDK. There are problems with
compatibility to obsolete systems which I do not fully understand.
        if (!SHGetSpecialFolderPath(0, shell_folder_path, CSIDL_PROGRAMS, FALSE))
        {
            printf("Finding the path of the Start menu failed\n");
            return ;
        }
I found the following was necessary as I have an obsolete shlobj.h
compared with the underlying (windows 2000 sp3) system.

C:\wfb\vim\bld\vim61\src> type pfget.c
#include <stdio.h>
#include <shlobj.h>

int main(void) {
    char shell_folder_path[MAX_PATH];
    int csidl = 0x0026; /* CSIDL_PROGRAM_FILES */

    if (!SHGetSpecialFolderPath(0, shell_folder_path, csidl, 0))
        exit(0);

    printf("%s\n", shell_folder_path);
    return 0;

Quote:}

C:\wfb\vim\bld\vim61\src>

It is a trivial matter to extend this to a probe to translate an
arbitrary number to a string.
--
Walter Briscoe