Solved

Add to Startmenü

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

685 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