Solved

Add to Startmenü

Posted on 2000-03-19
4
190 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
Comment Utility
GetLocaleInfo
0
 
LVL 7

Accepted Solution

by:
ahalya earned 25 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

762 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

6 Experts available now in Live!

Get 1:1 Help Now