• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java GUI running batch(.bat) file in command line  RSS feed

 
Tan Joey
Greenhorn
Posts: 8
Eclipse IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I have set my button in my GUI to run a batch(.bat) file to turn the system firewall turn on and off , sample code: "netsh firewall set opmode disable/enable" however java does not run as an administrator, I have try putting RunAs in front of the command but still doesn't work.

List of programs I had tried using:

lsrunas.exe
RunAs.exe
runasspc.exe
sanur.exe

Appreciate to help!

Thank you!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!