Quantcast
Channel: Spiceworks Community - Latest topics
Viewing all articles
Browse latest Browse all 182915

Python GUI button to run batch script

$
0
0

Hey everyone, I am not sure if this is the best place to post this but thought I would give it a try.

I am trying to learn Python and in this process I wanted to make a GUI so that once a button is pressed it launches a batch file.

I have gotten it to work half way. If I reference a batch file on the local machine it works but when I tell it to use a batch that is located on a different server, it opens and immediately closes a CMD window and doesn't do anything.

The code I am using to run the batch is:

import os
os.system("c:/test.bat")
os.system("K:/server/folder/script.bat")

Thanks in advance :)


Viewing all articles
Browse latest Browse all 182915

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>