How to invoke the Windows ShortCut Dialog wizard?
function InvokeShortCutDialog(Directory : string) : boolean;
var
Reg : TRegistry;
CmdLine : string;
begin
Result := false;
Reg := TRegistry.Create;
try
Reg.Rootkey := HKEY_CLASSES_ROOT;
if Reg.OpenKeyReadOnly('.LNKShellNew') then
begin
CmdLine := Reg.ReadString('Command');
CmdLine := StringReplace(CmdLine, '%1', Directory, []);
Result := True;
WinExec(PChar(CmdLine), SW_SHOWNORMAL );
end
finally
Reg.free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
InvokeShortCutDialog('c:Temp');
end;
| Is This Answer Correct ? | 0 Yes | 0 No |
How to Convert a TColor value to a HTML Color string ?
How to use the TUpdateSQLProvider.OnUpdateRecord method ?
How to Send an image to the printer ?
How to Get property information ?
How can I change the drive that MediaPlayer uses to play Audio ?
How to Use an instance of TPrinter ?
Where is proxies.dcu?
How to Declare a SafeArray in the type library editor?
Can you use the Naming Service with the version of VisiBroker that comes with Delphi 5 Enterprise?
What are the available Alternate security databases ?
what are Multiple Transports?
How to Display a file's associated icon?