Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

HELP ! Need A Batch File That ...


  • Please log in to reply

#1
command-line

command-line

    New Member

  • Member
  • Pip
  • 1 posts
Hey All :)
i need a batch file that opens it's self at system start up please tell me code
also i need a batch that :) :) :) Displays My I.P

Thanks In Advanced
  • 0

Advertisements


#2
absolute shady

absolute shady

    New Member

  • Member
  • Pip
  • 5 posts
Hi,

here are the steps to accomplish what you seek.

open a notepad.

type the foll. lines in

----------------------------
@echo off
ipconfig
cmd
---------------------------

save the notepad file as somename.bat on some location on your file system.


just try double clicking on the file. let it open. check the output. Is that what you needed ??

certainly that should display the ip address. perhaps you should be connected to a Network in the first place.


then all you need to do this is to add this file to the computer startup. there are two steps as foll.

STEP 1

Go to this location

c:\documents and settings\UserName\Start Menu\Programs\Startup

and just paste the .bat file that you created.

You should be done by this time. Try restarting the compuer and check.

STEP 2

Open "Regedit"

We are assuming that we are experianced users here

Navigate to the location

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

then add a new "string Value" by right clicking on the empty space.

Let the name of the String value be 'ipviewer"
and the value of it should be the location where you have the .bat file

so if suppose you have saved it as "ipviewer.bat" in C drive.

then the value should be "C:\ipviewer.bat"

thats it buddy.

Restart the computer. and Tell me what you get !
Cheers !

-Maran
www.slimshadym23.blogspot.com
  • 0

#3
Ehsanit

Ehsanit

    Member

  • Member
  • PipPipPip
  • 163 posts
Probably a safer way to get the batch file to start at boot time is to merely move it to (or create a shortcut to it in) the Startup folder in the Start Menu, without messing in the registry.

Note that ipconfig includes your IP on the local network (typically 192.168.0.xxx) and not the IP that any external websites or servers would see. Typing CMD is also a poor way of pausing the output. The pause command is better.

Edited by Ehsanit, 22 September 2010 - 01:47 PM.

  • 0

#4
imstuffed123

imstuffed123

    Member

  • Member
  • PipPip
  • 13 posts
Hmm... i'm starting to think you're trying to make some prankware.
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP