Jump to content

Execute a script only with a computer with a pre-established ip


acrane76
 Share

Recommended Posts

.... 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 by Chimp

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

Link to comment
Share on other sites

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

  • Developers

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

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

  • Developers
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

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...