Process := Process.Process(); ProcessInfo := ProcessInfo.ProcessStartInfo(_Filename,_Arguments); ProcessInfo.UseShellExecute := FALSE; ProcessInfo.LoadUserProfile := TRUE; ProcessInfo.Domain := 'Domain'; ProcessInfo.UserName := 'user'; SetSecureString('thepassword',PasswordString); ProcessInfo.Password := PasswordString; Process.StartInfo := ProcessInfo; Process.Start();
_SecureString := _SecureString.SecureString(); FOR i := 1 TO STRLEN(_String) DO BEGIN _SecureString.AppendChar(_String[i]); END;