Setting host name

Andrea Vironda 816 Reputation points


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?

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

4 answers

Sort by: Most helpful
  1. Dave Patrick 426.2K Reputation points MVP

    May need to ask the developer about the source.

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

  2. MotoX80 32,246 Reputation points

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

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

    Server: Wireless_Broadband_Router.home

    Name: slick.home

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


  3. MotoX80 32,246 Reputation points

    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]

    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
    /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.

    OPENFILES /Query /?
    OPENFILES /Query
    OPENFILES /Query /FO csv /NH
    OPENFILES /Query /S system /U username /P password /NH


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

  4. MotoX80 32,246 Reputation points

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

    Computer management displays the host name in the sessions list.


    Open files does not show the host name.


    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?


    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