Solved

Add to Startmenü

Posted on 2000-03-19
4
196 Views
Last Modified: 2010-04-04
How can i get the Startmenü - Programm Folder ?
This way works on an Englisch version of WinNt but on a German version the folder should look like Startmenü\Programme

Directory := MyReg.ReadString('Shell Folders','Start Menu','')+'\Programs\YourProgram'

How can i detect the language of the running Windows version ?
0
Comment
Question by:snoopy_Spy
[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
4 Comments
 
LVL 1

Expert Comment

by:yk030299
ID: 2634790
GetLocaleInfo
0
 
LVL 7

Accepted Solution

by:
ahalya earned 25 total points
ID: 2634928
You can use the "SHGetSpecialFolderLocation" function.  This doesn't help you find out the language of the Windows version, but it gives you the folder location.


uses ShellAPI, ShlObj;

function GetProgramFilesDir:string;

var Path : pchar;
    i : integer;
    ppidl: PItemIDList;

begin;
Result := '';
SHGetSpecialFolderLocation(handle, CSIDL_PROGRAMS, ppidl);

Path := StrAlloc(MAX_PATH);
if SHGetPathFromIDList(PPIDL, Path) then
 Result := string(Path);
StrDispose(Path);

end;
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2636356
Put a ddeclientconv onto your form and fill out the two propterites...
//ddeclientconv1.ddeservice:='progman';
//ddeclientconv1.ddetopic:='progman';      <<Manually put these in
 
Stick a listbox onto the screen and then put this code in a button or something.... that will return the information your after

var
p: pchar;
begin
 p:=ddeclientconv1.requestdata('Groups');
 listbox1.items.settext(p);
 strdispose(p);


if you want to add to the start menu folders do this....

 with ddeclientconv1 do
  begin
requestdata('Groups');
{   p:=ddeclientconv1.requestdata(items[itemindex]);
   listbox2.items.settext(p); }
      ExecuteMacro('[CreateGroup(Your New Start Group Folder)]',true);
      executemacro('[Showgroup(Your New Start Group Folder,3)]',true);
  end;


And i hope that helps

Craig C.
0
 

Author Comment

by:snoopy_Spy
ID: 2636741
Thanks
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

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 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