Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IP Office IP Copier - Selfmade Java Tool for convenience 8

Status
Not open for further replies.

Alfalis

Technical User
Oct 15, 2012
250
DE
Hi everyone,

I want to share a little program of mine I wrote.
Basically it's designed to make my day-to-day live as an IPO technician more comfortable.

ipcopierexample.png

What it is:
A little Java application showing you a list of all the IPOs you need to administrate at work.

What you can do:
Click the customers name to copy the IP of the IPO (hence the name IP Copier) into your clipboard.
Hover over the customers name to see the IP in a little tooltip.
Use the ping button to.. well you know ;)
The config button will configure the lan interface of your computer according to the customers network and IPO.
And finally (of course) you can edit the config.txt to add/remove customers and change settings.

Why I wrote IPC:
Because of my bad memory and my laziness ;D
Whenever I wanted to connect to one of our customers IPO first I had to look into an excel sheet containing all our customers informations including the IP of the IPO, set up my lan interface accordingly and finally type the IP into Manager (because 255x4 doesn't work if you're not in the same subnet plus using the broadcast address is fairly slow). So I started working on a very early and simple version of IPC with only one feature: Copy the IP by clicking the customers name..
After I had another few hours of spare time I added the ping and the config feature, making IPC even more convenient :)


So far I tested it on XP 32bit and Win7 64bit but as it's written in Java I'm sure it will work under almost every operating system.

Download @ Dropbox (13KB)

Please feel free to give me any feedback you can including questions, bug reports and new ideas!


thx and have fun
Alfalis

ptc.png


ACSS
 
funny thing is that all happens the way you say except that my LAN address doesn't change

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
One last test Westi if you don't mind :)

Do you see the account named Administrator in UAC?
If not please run cmd as admin, type "net user Administrator /active"
Go to your UAC and set a password for Administrator which should now show up in the users list
Now run cmd (normally, not as admin) and type -> runas /user:Laptop-i5\Administrator "netsh interface ipv4 set address name="Ethernet" static 192.168.42.1 255.255.255.0 192.168.42.1" <- (basically the same command as before but with Administrator instead of Joe and without the /savecred)
You should now be prompted to enter the admins password (the one you just set for Administrator)


I'm very interested in your results ;)

ptc.png


ACSS
 
worked like a charm

but still no joy with the java app

maybe I am cursed :p

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
So you are saying the command I wrote worked? Without starting cmd as admin?
Well in that case you should be able to change the config.txt to Laptop-i5\Administrator instead of Joe and it should work - or doesn't it?

ptc.png


ACSS
 
seems like a simple question but how do I run it as Administrator
right click only offers me open
I adjusted the security properties to allow full control and still nothing

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
So Westi, did you get it to work after my last post regarding the Administrator account? Hope so - I'm pretty much out of ideas here ;)

ptc.png


ACSS
 
hate to tell you, it is not working.
I tried before with the Administrator in the txt file when I had trouble with my Joe account but my Laptop seems to be very stubborn.

I will try it later on my home PC which is also Win8 and then I can see if it is maybe a Win8 problem as I am sure it is.

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
Remote access is great
tried it on my home PC and no joy either

it doesn't even ask me for the user password when I run it.

I tried also Administrator or my local user name.

Ein Satz mit X, war wohl nix :)

Thanks for putting up with me for so long, I will use it to copy the IP address into the clipboard for now :)

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
@Westi: I have one final (and desperate^^) idea..

Could you please try this (Download @ Dropbox) version of IPC?

It's IPC converted to a .exe with Launch4j. Please put it into a separate folder somewhere and start it.
This should create a new config.txt within this folder - edit it and change LocalAreaConnection to Ethernet (if this is still the name of your lan connection)
After that close IPC and restart by right-clicking -> run as admin (the Restart App button doesn't work for now in this version)

You should see a small version of IPC with only two entries (LAN-Port and WAN-Port) - plz let me know if the config buttons work in this version

ptc.png


ACSS
 
I am so sorry but without making any changes to the .txt file I tried and no go.
Ran it as Administrator and also no go
Turned sharing off - no go
adjusted the .txt file to use proper user name - no go
changed name of network connection to Ethernet (that is what the network connection is called) - no go
left network connection name and change user name back to LocalAdministrator - no go
changed the name of the NIC from Ethernet to LAN and adjusted .txt file - no go
hit the PC twice before starting it - no go
started crying while running it - still no go

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
You did close and restart IPC after every config change, right?
For your .exe version the line >>IPOfficePC\\LocalAdministrator is irrelevant, only thing that matters is the name of the connection (which is case sensitive, has to be unique and must not contain any spaces - but there shouldn't be any problems as yours is named Ethernet and I'm sure Windows won't let you give several connections the same name)
Note that the Free IP-Config and Restart App buttons don't work in this version..

ptc.png


ACSS
 
I restarted every time because I tried restart and it just closed

you are very persistent in getting this to work for me and I appreciate this but I don't want to waste more of your time.
Maybe I throw out the Win8 and re-install my old Win7 :)

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
I'm afraid I'm one of those guys who can't let things go if there is a problem I want to fix but have no idea why..

Turns out I had the chance to get my hands on a Windows 8 Professional 64bit system ;)

IPC wouldn't want to work for me at first but I think I found the problem:
Start up IPC (the original 1.0 or 1.1 jar, not the exe from before)
Open your config.txt once more and check how many "\" there are between Laptop-i5 and Administrator (yes, you need the real Administrator account here, no other account has the corresponding rights)
IF there are TWO please remove one of them making it "Laptop-i5\Administrator" (please also make sure your Administrator account is still active)

Turns out (at least for me) on Win8 cmd won't accept the command coming from IPC if there are two backslashes between the machines name and the username...

If this still doesn't fix it I have no other idea because with this "fix" IPC in the .jar version works perfectly fine for me on my Win8 testing machine..

Here is the config I used with IPC v1.1:

>Ethernet
>>Win8PC\Administrator
#############################################
LAN-Port
192.168.42.1
192.168.42.69 255.255.255.0 192.168.42.1
#############################################
WAN-Port
192.168.43.1
192.168.43.69 255.255.255.0 192.168.43.1
#############################################
Static
192.168.152.1
192.168.152.192 255.255.255.0 192.168.152.1


ptc.png


ACSS
 
I want to point out that the netsh syntax for XP is different from Win 7. Win 8 should be the same as Win7 however...

New England Communications
 
@JayNEC: Oh ok, did not know that:) How does netsh work on XP?

BTW: If there are enough requests for lets say a Linux version (or any other) I'll definitely look into that!

ptc.png


ACSS
 
yes there were 2 \ in there but removing it didn't work.

I used now the Administrator instead of my user name and it works

That was worse than giving birth

Thank you so much for your help and patience (and stubbornness)

I will now put all my customer sites into the list.


I would give you more stars but the system prevents me from giving you more than 1

Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
@Westi: Thanks, I'm glad we found a solution :D

Do you have any feature wishes, suggestions or ideas? Because I'm thinking about a new release in the next few days (probably including a readme with instructions on how to get IPC to work) and would love to add some new stuff, too ;)

ptc.png


ACSS
 
I wonder if you would be able to add a "Launch SSA" button that will launch and fill in the IP address in SSA as it launches (being a java app itself).... not really required but would definitely be "Cool" :)



"No problem monkey socks
 
a wider rim so it is easier to move would be great

If it could make my coffee in the morning then it would be perfect :)

I am already ecstatic that it does what it does and have a hard time wanting more.




Joe W.

FHandw, ACSS (SME), ACIS (SME)



“Quality is never an accident; it is always the result of high intention, sincere effort, intelligent direction and skillful execution; it represents the wise choice of many alternatives.”
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top