Results 1 to 4 of 4

Thread: Ip address script

  1. #1
    Join Date
    Dec 2005
    Posts
    81

    Ip address script

    Hello everyone
    I would love to have a script that allow me to double clicking a desktop icon to get my ip address.
    Someone could give me a hand to do this. Thank you
    Gunz Dont Kill PEOPLE




    I Do........

  2. #2
    Join Date
    Dec 2007
    Posts
    1,736

    Re: Ip address script

    Create the file Myip.url and save it:
    [InternetShortcut] URL = http://www.whatismyip.com/
    That's all.
    Then simply double-click it to see your IP.

  3. #3
    Join Date
    Dec 2007
    Posts
    1,599

    Re: Ip address script

    I found the script to make Windows XP automaticlly set the network to DHCP. It works great. Now I have two shortcuts on my desktop (with one of Danrok's beautiful backgrounds) called "local" & "internet" all I have to do it double-click and now I have access to my server or to internet. I should have done this months ago.

    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
        & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
    
    Set colNetAdapters = objWMIService.ExecQuery _
        ("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
     
    For Each objNetAdapter In colNetAdapters
        errEnable = objNetAdapter.EnableDHCP()
    Next

  4. #4
    Join Date
    Dec 2007
    Posts
    1,547

    Re: Ip address script

    Add these lines in your script, to "grab" the IP address, as well as Browser and date:

    // Find Server date and Time
    $date = date("l jS F Y, g:i A");

    // Find Browser and IPaddress
    $browser =$_SERVER['HTTP_USER_AGENT'];

    $ip = $_SERVER['REMOTE_ADDR'];



    Then add these lines (or similar) to the message body, to have the info added in the message (you must see the actuall script that you use, to see how these lines can be added in the message body):

    $pfw_message = ............ This is similar to how your script message body is being created

    These are the lines to add

    . "Date of submission : $date\n"
    . "Browser : $browser\n"
    . "IP address : $ip\n";

    If you need further help post your script here.

Similar Threads

  1. script to get MAC address info. from DHCP
    By SalemOR97301 in forum Windows Server Help
    Replies: 3
    Last Post: 11-01-2014, 10:14 AM
  2. Script for Blocking IP Address
    By Amaresh in forum Software Development
    Replies: 5
    Last Post: 30-12-2009, 02:57 PM
  3. Replies: 3
    Last Post: 12-11-2009, 06:29 PM
  4. Word 2008 + bibfuse: no script in script menu
    By deval4u in forum Software Development
    Replies: 5
    Last Post: 06-04-2009, 12:53 PM
  5. Replies: 2
    Last Post: 14-01-2009, 01:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,523,749.53095 seconds with 16 queries