Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I want to make a (VB6.0) program which makes it possible, when clicking a button, to runs CERHOST.EXE and automatically fills in IP address of the host.

(in our factory there are over 50 CX1000 plc's (hosts) each accessible with cerhost, only now we have to type in the 'hostname' or IP-address EACH time...)
Thanks for any help on this,

Eric
Posted
Updated 18-Aug-10 7:18am
v2

Is this something you can do with Shell[^]?


There's also an MS article here[^].

Cheers.
 
Share this answer
 
Comments
Eric from Joure 19-Aug-10 16:55pm    
Thanks Mr. James,

I think I could run the program from VB with the shell function. But how do I 'fill in' the IP address. Don't know if there are 'handles' which I could use... Thanks anyway.

Eric
TheyCallMeMrJames 19-Aug-10 17:05pm    
Add it to your string when you're making the call. For example, "program.exe 192.168.0.1". This assumes, of course, that the program accepts command line arguments. Is that the case?
Eric from Joure 19-Aug-10 17:16pm    
Nope thats not the case. This program (CERHost.exe = CE Remote Host) does not accept line arguments so it will be pretty hard to get it working this way. I did get another tip: use 'macro recorder' to mimic mouse movements which could do the trick. Not a nice solution though...
Time to bust out the old school: pipe the data in through stdin (and save results of stdout).

Here's[^] a KB article.

I think stdin redirection is where you're going to end up, you'll just need to find an approach that works for your situation.

Cheers.
 
Share this answer
 
Comments
Eric from Joure 19-Aug-10 18:00pm    
Cheers to you too mr. James. This i'm afraid is way out of my league. Will read the article though, always learnfull. Goodnight (from Holland),
Eric

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900