obtaining file information from another machine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John

    obtaining file information from another machine

    Hello,

    I need to know which programs are opn on another machine in my network,
    these programs are opened from a shared drive on the server. How can I do
    this ? I've already dowloaded a sample program form vbnet.mvps.org but it
    doesn't work??

    Greets John


  • Randy Birch

    #2
    Re: obtaining file information from another machine

    I just tried the code off the site and it works as advertised. NetFileEnum
    is designed to return the names of some or all open files on a server. It
    will not return files on the local machine opened by apps running on that
    machine. If you point it to the server, it should list the files as long as
    the application opening the files has it opened for exclusive use. AFAIK, if
    the app just opens, reads and closes the file the file won't be identified
    in the list, even if the user is still working on the file.

    As a simple test to ensure the code works, on your local machine open
    Explorer, select a folder containing some word or excel files, share that
    folder, then map a drive to that folder on your machine, i.e. X:\ = c:\my
    documents share. Now open one of the files using that mapped drive X:\ an
    run the code specifying "" as the server - the file(s) you opened through
    this networked share should be listed. Once you're assured the code works,
    open one of the server files and change the "" to the server name.

    --


    Randy Birch
    MS MVP Visual Basic



    "John" <nobody@fiktief .com> wrote in message
    news:41ab15c5$0 $25052$ba620e4c @news.skynet.be ...
    : Hello,
    :
    : I need to know which programs are opn on another machine in my network,
    : these programs are opened from a shared drive on the server. How can I do
    : this ? I've already dowloaded a sample program form vbnet.mvps.org but it
    : doesn't work??
    :
    : Greets John
    :
    :

    Comment

    • John

      #3
      Re: obtaining file information from another machine


      "Randy Birch" <rgb_removethis @mvps.org> schreef in bericht
      news:JY-dnesfcMl3MzbcRV n-tQ@rogers.com.. .[color=blue]
      > I just tried the code off the site and it works as advertised. NetFileEnum
      > is designed to return the names of some or all open files on a server. It
      > will not return files on the local machine opened by apps running on that
      > machine. If you point it to the server, it should list the files as long[/color]
      as[color=blue]
      > the application opening the files has it opened for exclusive use. AFAIK,[/color]
      if[color=blue]
      > the app just opens, reads and closes the file the file won't be identified
      > in the list, even if the user is still working on the file.
      >
      > As a simple test to ensure the code works, on your local machine open
      > Explorer, select a folder containing some word or excel files, share that
      > folder, then map a drive to that folder on your machine, i.e. X:\ = c:\my
      > documents share. Now open one of the files using that mapped drive X:\ an
      > run the code specifying "" as the server - the file(s) you opened through
      > this networked share should be listed. Once you're assured the code[/color]
      works,[color=blue]
      > open one of the server files and change the "" to the server name.
      >
      > --
      >
      >
      > Randy Birch
      > MS MVP Visual Basic
      > http://vbnet.mvps.org/
      >
      >
      > "John" <nobody@fiktief .com> wrote in message
      > news:41ab15c5$0 $25052$ba620e4c @news.skynet.be ...
      > : Hello,
      > :
      > : I need to know which programs are opn on another machine in my network,
      > : these programs are opened from a shared drive on the server. How can I[/color]
      do[color=blue]
      > : this ? I've already dowloaded a sample program form vbnet.mvps.org but[/color]
      it[color=blue]
      > : doesn't work??
      > :
      > : Greets John
      > :
      > :
      >[/color]

      Randy,

      Ok it works now, another question can I terminate the program on another
      computer?
      I want to start a program on a computer, the first thing I do is look on
      other computers in my network if the program is running and if it is running
      than terminate that program (the boss can override any other user)

      many thanks

      Greets John



      Comment

      • Randy Birch

        #4
        Re: obtaining file information from another machine

        Nope. You can reboot the user's machine, but that's a bit drastic, eh?

        --


        Randy Birch
        MS MVP Visual Basic



        "John" <nobody@fiktief .com> wrote in message
        news:41ac5da2$0 $25071$ba620e4c @news.skynet.be ...
        :
        : "Randy Birch" <rgb_removethis @mvps.org> schreef in bericht
        : news:JY-dnesfcMl3MzbcRV n-tQ@rogers.com.. .
        : > I just tried the code off the site and it works as advertised.
        NetFileEnum
        : > is designed to return the names of some or all open files on a server.
        It
        : > will not return files on the local machine opened by apps running on
        that
        : > machine. If you point it to the server, it should list the files as long
        : as
        : > the application opening the files has it opened for exclusive use.
        AFAIK,
        : if
        : > the app just opens, reads and closes the file the file won't be
        identified
        : > in the list, even if the user is still working on the file.
        : >
        : > As a simple test to ensure the code works, on your local machine open
        : > Explorer, select a folder containing some word or excel files, share
        that
        : > folder, then map a drive to that folder on your machine, i.e. X:\ =
        c:\my
        : > documents share. Now open one of the files using that mapped drive X:\
        an
        : > run the code specifying "" as the server - the file(s) you opened
        through
        : > this networked share should be listed. Once you're assured the code
        : works,
        : > open one of the server files and change the "" to the server name.
        : >
        : > --
        : >
        : >
        : > Randy Birch
        : > MS MVP Visual Basic
        : > http://vbnet.mvps.org/
        : >
        : >
        : > "John" <nobody@fiktief .com> wrote in message
        : > news:41ab15c5$0 $25052$ba620e4c @news.skynet.be ...
        : > : Hello,
        : > :
        : > : I need to know which programs are opn on another machine in my
        network,
        : > : these programs are opened from a shared drive on the server. How can I
        : do
        : > : this ? I've already dowloaded a sample program form vbnet.mvps.org but
        : it
        : > : doesn't work??
        : > :
        : > : Greets John
        : > :
        : > :
        : >
        :
        : Randy,
        :
        : Ok it works now, another question can I terminate the program on another
        : computer?
        : I want to start a program on a computer, the first thing I do is look on
        : other computers in my network if the program is running and if it is
        running
        : than terminate that program (the boss can override any other user)
        :
        : many thanks
        :
        : Greets John
        :
        :
        :

        Comment

        Working...