Get notified if cmd.exe fails to successfully move a file?
问题 I run cmd.exe to move a file with Administrator rights: ThisParams := '/C move ' + '"' + ThisSourceFile + '"' + ' ' + '"' + ATargetFile + '"'; Winapi.ShellAPI.ShellExecute(0, 'runas', 'cmd.exe', PChar(ThisParams), '', Winapi.Windows.SW_HIDE); Unfortunately, ShellExecute always gives back success, regardless of whether the move action was successful or not (the move action would fail for example if the target file exists and it is read-only or if the target disk is write-protected). So how can