Capturing PC Computer Name
I worked way to long today to figure out how to capture the computer name that filemaker pro is running on.
FileMaker only gives us get(HostName) which returns the name of the computer that is hosting the file.
I needed to capture all of the PC names that a Client uses in a large organization. So I decided to use the Command Line after other attempts at using a local FileMaker file.
The command line: Echo %computername%
is the right call accept how do I get that off the screen? So I tried to saving it as a txt file:
This works, but all the PCs are managed so I was afraid for good reason that it would not write to the Root directory. I could not change the file path to another location, however in hindsight I probably just need to add another command line of cd\ c:\documents and settings\….
But I found a better way anyway. So entering the below into in Send Events
Echo %computername% | Clip
This copies the Echo to the Clipboard so I can use the next line to paste it into a field in FM.
Just thought I would share in case you come across a similar issue.