LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

windows remote

I have folk who will use windows remote Desktop connection to log into a computer that is managing a LAN with an instrumentation/test computer that is not connected to the outside net. To make this work politely, the remote needs to run labview code to handle a remote front panel from the test computer and hand of files to the user. This works great if the user enters his file path correctly but this would be a lot easier if I could get his computer to identify itself so I could build the correct file path for him. Any good ideas? 

0 Kudos
Message 1 of 6
(3,087 Views)

Hi FredM,

 

It sounds like you want to be able to programmatically determine the computer name. If so, this KB shows one way to get the computer name in LabVIEW.

 

Best Regards,

Matthew B.
Offering Manager
NI
0 Kudos
Message 2 of 6
(3,045 Views)

Almost - BUT - no banana.

If I use windows remote desktop to access my interface computer, and execute the above process on the interface computer, I get it's name/IP address, not mine. I am trying to write a program that will execute on the interface computer and pass files from the test computer that only it can see (a seperate LAN), to my computer over the company net. I am trying to build this so the user does not have to spend a lot of time figuring out the correct way to enter his computer ID to get to the directory he will want his files dropped into. I expect this program to be used a lot - in future - so I want it to be flexible and easy to use.

0 Kudos
Message 3 of 6
(3,031 Views)

Hi FredM,

 

I think I understand now - you want the computer name of the computer that is remoted into your interface machine via Remote Desktop. I'm not sure if this is possible. I did some searching on the internet and wasn't able to find an API we could tap into to get this information.

 

Is there a reason why you want to use Remote Desktop? If you can access the machine over the corporate network, it may be easier to design a standalone program using standard network communication that the user can just run to cause the file transfer to occur or to do remote control of the instruments. Part of the communication could exchange the computer name of the computer to transfer the files to.

 

Best Regards,

Matthew B.
Offering Manager
NI
0 Kudos
Message 4 of 6
(3,003 Views)

That is disapointing. But the reason for it is to avoid having to install any software on the user systems and just use the built in windows features. Perhaps I have to take this apart with visual studio. I hate doing that because it always takes me 3-4 days to relearn the protocols well enough to program in it. Well, if no one finds this easter egg, I can get the program limping along. Just a lot more to setup than I was hoping for.

0 Kudos
Message 5 of 6
(2,989 Views)

I am connecting to a remote PC running Win7 with Remote Desktop where LabVIEW is running.  When I run the following command line in the System Exec.vi on the remote machine , the IP of the machine that's calling the remote is in the returned message:


powershell.exe     Get-WinEvent Microsoft-Windows-TerminalServices-LocalSessionManager/Operational  -MaxEvents 1 | format-list message

 

Point the working directory to:

 

C:\Windows\System32\winevt\Logs

 

Here's what I get back:

 

Message : Remote Desktop Services: Shell start notification received:

User: CAE-ERP-Video\CAE
Session ID: 2
Source Network Address: 192.168.1.68

 

 

Just parse out the IP and you're good to go.

 

JohnCS

 

 

 

 

0 Kudos
Message 6 of 6
(2,970 Views)