I want to delete some files from a remote computer's mapped(U:) drive within a WPF application.
I tried to use WMI like
"SELECT * FROM CIM_DataFile WHERE Drive='U:' and Path='\\Windows\\'"
But I found out that with WMI I can't access mapped drives of remote computer. Then I tried with psexec to start a cmd and give it as a parameter to delete it like
p.StartInfo.Arguments = String.Format(@"-u Domain\User -p password -i \\{0} cmd.exe /c rd U:\Windows /s /q", Hostname);
but it still didn't work. Is there any way to remove files from a remote computer's mapped network drive?