Sign in to follow this  
Followers 0
chaddiablo

Start, Run service

13 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

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 ?


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The game requires access to the internet to check if the cd key is a valid. I tried it with the firewall on and it said it cant access the internet.

Edited by chaddiablo

Share this post


Link to post
Share on other sites

Then you need to make an exception for the executable, not disable the whole firewall.

Oh thanks, ill try doing that.

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

also found out how to turn off firewall and turn back on

Send("netsh{SPACE}firewall{SPACE}set{SPACE}opmode{SPACE}Disable{ENTER}

and for turn back on

Send("netsh{SPACE}firewall{SPACE}set{SPACE}opmode{SPACE}Enable{ENTER}

Share this post


Link to post
Share on other sites

chaddiablo why are you using Run() function when you can do this:

Send("#r")
Send("cmd.exe{Enter}")
;... etc

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

chaddiablo why are you using Run() function when you can do this:

Send("#r")
Send("cmd.exe{Enter}")
;... etc
old codding habbits i suppose

Share this post


Link to post
Share on other sites

old codding habbits i suppose

I had this dog. Very old.

Don't want to go into the details now but he is gone. :)


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

Well that does shorten like all my work i did lol

Share this post


Link to post
Share on other sites

Why use Send() when you can do this?

The everlasting question.

Surprisingly.


♡♡♡

.

eMyvnE

Share this post


Link to post
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
Sign in to follow this  
Followers 0