Setting host name

Andrea Vironda 816 Reputation points
2021-01-14T16:13:51.167+00:00

Hi,

sometimes PC users forgot to close a file, and I get error that file is on use.

I use "networkopenedfiles-x64" but I find that some PC has an "host name", some other no.

Where can I add this value to windows local properties?
6dce422e-7504-4a72-8862-cb719b38586b

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,263 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Dave Patrick 426.1K Reputation points MVP
    2021-01-14T16:30:05.93+00:00

    May need to ask the developer about the source.
    https://www.nirsoft.net/utils/network_opened_files.html

    --please don't forget to Accept as answer if the reply is helpful--


  2. MotoX80 32,081 Reputation points
    2021-01-18T17:55:20.023+00:00

    I get Default server as a string and its address as IP

    That sounds strange. You did a "nslookup 192.168.1.20" correct? What about the others, 192.168.1.47, 192.168.1.39, etc?

    c:\>nslookup 192.168.1.3
    Server: Wireless_Broadband_Router.home
    Address: 192.168.1.1

    Name: slick.home
    Address: 192.168.1.3

    On one of those machines run ncpa.cpl. Do you have it set to register the name in DNS? (Assuming DHCP.)

    57791-capture.jpg


  3. MotoX80 32,081 Reputation points
    2021-01-18T18:03:26.697+00:00

    I am not familiar with networkopenedfiles-x64. Maybe you could clarify your environment. Are you running this program on your desktop against a server like "networkopenedfiles-x64 /server MyFileServer"? Or are you RDP'd to the server and running it locally?

    If you open Computer Management on the server and look at Shared Folders, do the names show up there?

    Does Openfiles work?

    c:\>openfiles /query /?

    OPENFILES /Query [/S system [/U username [/P [password]]]]
    [/FO format] [/NH] [/V]

    Description:
    Enables an administrator to display a list of files and folders
    that have been remotely opened on a system.

    Parameter List:
    /S system Specifies the remote system to connect to
    /U [domain]user Specifies the user context under which
    the command should execute.
    /P [password] Specifies the password for the given user
    context.
    /FO format Specifies the format in which the output is
    to be displayed.
    Valid values: "TABLE","LIST","CSV".
    /NH Specifies that the "Column Header" should
    not be displayed.
    Valid only for "TABLE" and "CSV" formats.
    /V Specifies that verbose output is displayed
    /? Displays this help message.

    Examples:
    OPENFILES /Query /?
    OPENFILES /Query
    OPENFILES /Query /FO csv /NH
    OPENFILES /Query /FO LIST /V
    OPENFILES /Query /S system /U username /P password /NH

    c:\>

    Update: I see the same behavior on on my WS2012.


  4. MotoX80 32,081 Reputation points
    2021-01-19T14:34:42.313+00:00

    Here's what I found on my Win10 Home machine. (No Active Directory obviously).

    Computer management displays the host name in the sessions list.

    58167-capture.jpg

    Open files does not show the host name.

    58176-capture1.jpg

    Powershell's Get-SmbOpenFile and Get-SmbSession shows the IP in the ClientComputerName column. This would be a good test on your system. Do these command resolve any of your client names?

    I believe that I have a WS2012 VM that I can test with later today. I don't know if this behavior is due to my running a Home edition on my laptop or not. Or related to my using local accounts with the same name/pswd on both machines.

    @Dave Patrick can you run on quick test?

    58241-capture2.jpg

    We can't answer as to what networkopenedfiles is doing. You will have to contact the author for support.

    If you configure your clients to register their name in DNS, then we could easily write a Powershell script that displays what you want. That requires nslookup to work.

    0 comments No comments