Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Hi,

Running a shared solution on a Win XP peer-to-peer network. I want to find the network name of the computer that opened a file.

Status(CurrentHostName) will return the network name of the computer hosting the file, and I can parse out the name of the computer on which the file is stored from Status(CurrentFilePath). (Yeah, I know, it should be the same as the host name, but hey, this isn't a perfect world. People do dumb stuff.) Status(CurrentUser) will tell me the windows logon name of the user. But I need the name of the computer, not the user. How can I get this?

Thanks,

Dan

get it from the registry with wsh or dde /regedit

  • Author

OK. Next question. How do I do that? How can I get it returned to a FM field?

  • Author

Ok, I see you guys didn't just want to make it easy on me and give me the perfect little script to do the job. smile.gif But after poking around a bit with your leads, here's what I came up with. Step one was to find out what WSH was, and then dust off my VB knowledge. Step two was to create this:




Dim objNet

Set objNet = CreateObject("WScript.NetWork") 



Dim strInfo

strInfo = "User Name is     " & objNet.UserName & vbCRLF & _

          "Computer Name is " & objNet.ComputerName & vbCRLF & _

          "Domain Name is   " & objNet.UserDomain



wscript.echo strInfo



Set objNet = Nothing                    'Destroy the Object to free the Memory



' call this program from the command line with the following:

' cscript compname.vbs>c:compname.txt

' this will direct the output to c:compname.txt



and save it as CompName.vbs. When it's called from the command prompt as indicated in the notes, I get a text file that is easy enough to read and parse in FM.

Thanks guys,

Dan

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.