L
L
Luan2018-02-17 14:08:52
Python
Luan, 2018-02-17 14:08:52

How to run python script as admin right in windows?

I'm trying to run a script. Specifically os.system("ping -c 1 192.168.1.1"). And gives: Access is denied. The -c option requires administrator rights. How can you add them?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Nikolaev, 2018-02-18
@nightvich

Run cmd as administrator and call your script in it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question