09-02-2010 11:26 AM
Hi,
Does anybody know if there's a way of programmatically querying any (or all) of the the Windows XP Logon Information (username, domain, etc.) for the machine that a given VI is running on?
Any ideas gratefully received!
Many Thanks,
Dan
09-02-2010 11:58 AM
From within LabVIEW, you can call a windows dll for that.
I'm not sure which one you'll need because I have yet to implement such a solution, but you may start by doing a search on the internet for that topic.
A quick search revealed the following:
Old info, but could still provide some insights:
http://support.microsoft.com/kb/196070
Lots of info related to login:
http://www.bigresource.com/VB-Windows-Login-Programmatically-fg3d9QPQjh.html
Have a look at the list of links on this topic:
The above is a start. I didn't search this forum, but you could do that as well.
09-02-2010 12:07 PM
A quick search on this forum didn't reveal anything. It was a quick search, so you could try as well. I could have missed something.
Found some more info on the web. May or may not be helpful, but might be worth a look. It's for JAVA, but you might be able to either create your own dll, call WIndows functions with LabVIEW, or create a script.
See link below:
http://www.velocityreviews.com/forums/t365945-windows-login-information.html
09-02-2010 12:12 PM - edited 09-02-2010 12:12 PM
The attached vi provides the logon username by using a dos command line.
I can take no credit for this as I downloaded it from these forums a few years back - sadly I have lost the link so cannot correctly credit the person who posted it (sorry to whoever you are!).
There may be similar command line queries to access domain etc. (e.g ipconfig), you'll just need to parse the output accordingly.
Ian
09-02-2010 02:44 PM - edited 09-02-2010 02:46 PM