私がやろうとしていること
- PSExec を起動して、「Net Use * \Server\Share」コマンドを渡すリモート コンピューターで CMD を開きます。
- PSExec を再度起動し、作成したばかりの共有を削除します。
ワイルドカードが使用したドライブ文字を取得する方法がわかりません。
Process p = new Process();
p.StartInfo.UseShellExecute = false;
p.StartInfo.FileName = @"\\Server\PStools\PSExec.exe";
p.StartInfo.Arguments = @"\\ComputerName -e -s cmd.exe ""/C Net USE * \\Server\Share /Persistent:NO""";
p.Start();