acrane76 Posted February 11, 2018 Share Posted February 11, 2018 hello how i can execute this script below only with a computer with this ip 82.22.74.36 ? , i want that if this script is executed on a computer that is not this ip 82.22.74.36 this script must not work , but must only work with this ip 82.22.74.36 run(@ComSpec & " /c del /F /Q mmr.exe", "", @SW_HIDE) Link to comment Share on other sites More sharing options...
JohnOne Posted February 11, 2018 Share Posted February 11, 2018 if _GetIp() == "1.2.3.4" then ;do stuff endif Something like that. Xandy 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Gianni Posted February 11, 2018 Share Posted February 11, 2018 (edited) .... since _getip() returns your "public" IP address, in a network where clients are connected to internet over a proxy, all clients of the LAN should have the same public IP (that is the outer public IP of the proxy shared to all the clients of the LAN) perhaps in this case could be a better choice @IPAddress1 instead of _getip() Edited February 11, 2018 by Chimp Xandy 1 Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
acrane76 Posted February 11, 2018 Author Share Posted February 11, 2018 (edited) i have tried this but does not work if @IPAddress1 == "83.22.74.36" then run(@ComSpec & " /c del /F /Q mmr.exe", "", @SW_HIDE) endif Edited February 11, 2018 by acrane76 Link to comment Share on other sites More sharing options...
Xandy Posted February 11, 2018 Share Posted February 11, 2018 (edited) What does _GetIp() return? Run a: ConsoleWrite("_GetIp(): " & _GetIp()) to see the results of _GetIp(). Edited February 11, 2018 by Xandy Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to comment Share on other sites More sharing options...
JohnOne Posted February 11, 2018 Share Posted February 11, 2018 21 minutes ago, acrane76 said: i have tried this but does not work if @IPAddress1 == "83.22.74.36" then run(@ComSpec & " /c del /F /Q mmr.exe", "", @SW_HIDE) endif because @ipadress1 gives lan ip, looks like you want wan ip. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
acrane76 Posted February 11, 2018 Author Share Posted February 11, 2018 42 minutes ago, JohnOne said: because @ipadress1 gives lan ip, looks like you want wan ip. does not work either with _GetIp() Link to comment Share on other sites More sharing options...
JohnOne Posted February 11, 2018 Share Posted February 11, 2018 Does it return your ip address? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Developers Jos Posted February 11, 2018 Developers Share Posted February 11, 2018 What doesn't work? What does _GetIp() return? How are you testing? In other words: "Doesn't work" is not enough information and you need to help us to help you! Jos 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 More sharing options...
Gianni Posted February 11, 2018 Share Posted February 11, 2018 could you please run the following snippet and post the output? #include <Inet.au3> Local $sNet = "Local IP : " & @IPAddress1 & @CRLF & "Public IP : " & _GetIP() ConsoleWrite($sNet & @CRLF) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt.... Link to comment Share on other sites More sharing options...
acrane76 Posted February 11, 2018 Author Share Posted February 11, 2018 37 minutes ago, Jos said: What doesn't work? What does _GetIp() return? How are you testing? In other words: "Doesn't work" is not enough information and you need to help us to help you! Jos The deleting of the file mmr.exe does not work Link to comment Share on other sites More sharing options...
ripdad Posted February 11, 2018 Share Posted February 11, 2018 13 hours ago, acrane76 said: hello how i can execute this script below only with a computer with this ip 82.22.74.36 ? , i want that if this script is executed on a computer that is not this ip 82.22.74.36 this script must not work , but must only work with this ip 82.22.74.36 run(@ComSpec & " /c del /F /Q mmr.exe", "", @SW_HIDE) Quote Host name: dwo36.neoplus.adsl.tpnet.pl. IP address: 83.22.74.36 Location: Sosnowiec, POLAND You cannot delete a file from a domain computer, unless you are logged into that computer with remote software. I assume you are not, since you are testing for the correct IP, which should be self-evident. Also, if mmr.exe is running, how do you plan to delete it without shutting it down first? "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
Developers Jos Posted February 12, 2018 Developers Share Posted February 12, 2018 10 hours ago, acrane76 said: The deleting of the file mmr.exe does not work ah ... your are : Read the first question and answer that without reading the whole post Just re-read the post, think about it a little and give some sort of complete answer would be nice. Jos 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now