LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help retrieving info from operating system

Highlighted
Hi all

I am trying retrieve the local ip address and a list of printers that are
available on the local machine. We have ruled out using ActiveX because we
are having some issues with ActiveX on some of our NT boxes. We would like
to directly query the OS for this information if possible. Any info or help
would be greatly appreciated.

Regards
Kevin
0 Kudos
Message 1 of 5
(1,231 Views)
On national instruments website, windows utilities collection under
downloads section. Those utils make winAPI calls. In general you can get
a lot of things done by using winAPI calls. Also I am surprised that
ActiveX is not working on NT boxes, probably some components have not been
registered.
Also in general if you are looking for something then go first to the NI
website and look at their downloads section, lot of useful things there.


"Kevin Ross" wrote in message
news:7uol5l$b3h$1@flood.xnet.com...
> Hi all
>
> I am trying retrieve the local ip address and a list of printers that are
> available on the local machine. We have ruled out using ActiveX because we
> are having some issues with ActiveX on some of our NT boxes. We would like
> to directly
query the OS for this information if possible. Any info or
help
> would be greatly appreciated.
>
> Regards
> Kevin
>
>
0 Kudos
Message 2 of 5
(1,231 Views)
Thanks

I have acquired the API Vi's but there are no IP or printer calls in the
library. I'm not into programming the API so I'm looking for a book on the
API (any suggestions?). I don't even know if the calls are available from
the API but it seems they should be. We are not sure what the problem is
with our ActiveX stuff. It works on one NT box but not on another. These are
new systems right out of the box, we turned the problem over to NI and are
waiting for a response.

Kevin

bubucis wrote in message
news:7uorup$ild$1@bgtnsc02.worldnet.att.net...
> On national instruments website, windows utilities collection under
> downloads section. Those utils make winAPI calls. In general you can get
> a lot of things done by using winAPI calls. Al
so I am surprised that
> ActiveX is not working on NT boxes, probably some components have not been
> registered.
> Also in general if you are looking for something then go first to the NI
> website and look at their downloads section, lot of useful things there.
0 Kudos
Message 3 of 5
(1,231 Views)
> I have acquired the API Vi's but there are no IP or printer calls in the
> library. I'm not into programming the API so I'm looking for a book on the
> API (any suggestions?). I don't even know if the calls are available from
> the API but it seems they should be. We are not sure what the problem is
> with our ActiveX stuff. It works on one NT box but not on another. These are
> new systems right out of the box, we turned the problem over to NI and are
> waiting for a response.

This is usually what makes ActiveX programming so difficult.
Its not the concept, its that it mysteriously doesn't work
some fraction of the time. Be sure to wire up the error I/O
as that may indicate what is failing and why. It might be
that some component isn't registered
, or it could be that
you don't have the right libraries for COM. MS tends to
silently patch things when installing Internet Explorer;
so as crazy as it sounds, try installing a recent version
of IE on the machine and see if that fixes the problem.

Greg McKaskle
0 Kudos
Message 4 of 5
(1,231 Views)
In article <7uol5l$b3h$1@flood.xnet.com>,
"Kevin Ross" wrote:

>Hi all
>
>I am trying retrieve the local ip address and a list of printers that are
>available on the local machine. We have ruled out using ActiveX because we
>are having some issues with ActiveX on some of our NT boxes. We would like
>to directly query the OS for this information if possible. Any info or help
>would be greatly appreciated.
>
>Regards
>Kevin
>
>

This is not a complete answer, and may not be as clean as you like, but I can think of an
alternative: use a system exec call to launch command.com, and through command.com you can run
arp.exe (its in your windows directories) using the -a switch to return a list of IP addresses,
then maybe pipe that result to a text file an
d have labview read it. For the network printer, I
don't know exactly but maybe the 'net use' command or one of the "net..." commands out of the
dos prompt will return the resource name you need.

V.R. - Viewpoint
0 Kudos
Message 5 of 5
(1,231 Views)