0

I'm trying to automatize a CMD command process in windows

I try this:

import subprocess

cmd = 'net use * /delete'

p1 = subprocess.Popen(cmd,shell=True)

p1.wait()

I have this response:

Continuing will cancel the connections.

Do you want to continue this operation? (Y/N) [N]:

I want to put a Y for automatize the process

  • 1
    https://stackoverflow.com/questions/13284106/why-net-use-delete-does-not-work-but-waits-for-confirmation-in-my-powershel check this answer – Ritwik G Mar 18 '21 at 05:18
  • 1
    Does this answer your question? [Why "net use \* /delete" does not work but waits for confirmation in my PowerShell script?](https://stackoverflow.com/questions/13284106/why-net-use-delete-does-not-work-but-waits-for-confirmation-in-my-powershel) – Ritwik G Mar 18 '21 at 05:19

0 Answers0