Solved

Add to Startmenü

Posted on 2000-03-19
4
192 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Delivering innovative fully-managed cloud services for mission-critical applications requires expertise in multiple areas plus vision and commitment. Meet a few of the people behind the quality services of Concerto.

939 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

10 Experts available now in Live!

Get 1:1 Help Now