Topic: Help with a Script
Hi All,
I need help with the following action for a button. When click I want to map a network drive using parameters from user's input boxes, the following code doesn't give me any error but does not map the drive
thanks in advance!
procedure Form1_Button1_OnClick (Sender: TObject; var Cancel: boolean);
var
User: string;
Pass: string;
begin
User := Form1.edUser.Text;
Pass := Form1.edPass.Text;
OpenFile('net use U: \\DC-1\UsersHome$\"User" /u:,"User" "Pass" net.exe');
end;
begin
Form1.mniFile.Visible := False;
Form1.mniOptions.Visible := False;
Form1.mniSettings.Visible := False;
Form1.mniReport.Visible := False;
Form1.mniAbout.Visible := False;
end.