From: "Alberto Spelta" Newsgroups: borland.public.delphi.winapi References: <3b1f6827$1_2@dnews> Subject: Re: Mapping drives Date: Thu, 7 Jun 2001 14:25:13 +0200 Lines: 45 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 217.56.77.10 Message-ID: <3b1f72b1$1_2@dnews> X-Trace: dnews 991916721 217.56.77.10 (7 Jun 2001 05:25:21 -0700) Path: dnews Xref: dnews borland.public.delphi.winapi:137482 I hope that this will helps you. Alberto Spelta Aspel@tin.it // For Show The Network Drive Map Dialog. WNetConnectionDialog( Handle, RESOURCETYPE_DISK ); procedura var InstHandle: HINST; begin // Add map dir InstHandle := ShellExecute(0, nil, 'subst.exe', 'z: \\ComputerName\SharingName', nil, 0); // Remove Map Dir InstHandle := ShellExecute(0, nil, 'subst.exe', 'z: /d', nil, 0); // Handle The raised error if InstHandle <= 32 then ShowMessage( SysErrorMessage(InstHandle) ); end; "Stuart MacAulay" ha scritto nel messaggio news:3b1f6827$1_2@dnews... > Hi, > > I need to map the contents of a string (containing a file path) to a drive > letter without using ShellExecute, etc. > Any advice or assistance gratefully received. > > Regards, > > Stuart