Jump to content

Start, Run service


Recommended Posts

Hi in a script i made, i made it so the game installs and everything. But it asks that i should turn off firewall (only one i have is windows firewall) while installing. Anyone know how to turn it off then turn it back on?

nvm

Edited by JohnMC
Link to comment
Share on other sites

  • Developers

Hi in a script i made, i made it so the game installs and everything. But it asks that i should turn off firewall (only one i have is windows firewall) while installing. Anyone know how to turn it off then turn it back on?

Why would you need to turn of the firewall when installing a game?

More Details ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Okay i tried to add the exception with this

Run('cmd')
WinWait("E:\WINDOWS\system32\cmd.exe", "")
If Not WinActive("E:\WINDOWS\system32\cmd.exe", "") Then WinActivate("E:\WINDOWS\system32\cmd.exe", "")
WinWaitActive("E:\WINDOWS\system32\cmd.exe", "")
Send("netsh{SPACE}firewall{SPACE}set{SPACE}allowedprogram{SPACE}={SPACE}E:\Games\PIle2\PIle2.exe{SPACE}PIle2{SPACE}mode{SPACE}={SPACE}enabled{ENTER}")
Send("Exit")

But it didnt add the exception, is there something wrong here? And if possible is there a way to not use cmd?

Edited by chaddiablo
Link to comment
Share on other sites

Okay i found how to do it.

I have to add it first before i "set" it.

Send("netsh{SPACE}firewall{SPACE}add{SPACE}allowedprogram{SPACE}program{SPACE}={SPACE}E:\Games\PIle2\PIle2.exe{SPACE}PIle2{SPACE}enable{ENTER}")

this adds it into the firewall exceptions

Edited by chaddiablo
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...