Results 1 to 5 of 5
  1. #1
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Finding the network (VB6)

    Hi All

    I have written a piece of code that finds the mac address of a computer and then sends it through my network to a folder and appends it to a csv file. This is to help automate the issue of collecting mac addresses for the technical team who are doing a massive roll out of new PC's to the company. Currently they are writing them down on pieces of paper and then emailing them to the system administrator. As you can imagine, a very, very laboriuos task.

    My project works fine if you are logged on to the network but the problem is the tech guys are logging in locally as the Administrator (Win 2000). When they run the application an error message comes up saying the network folder cannot be found (Obviously as they are not logged into the network). Is there a way I can change this code so that the network can be found (whilst in Administrator) to pump this data through to a csv file. My code reads as follows(cut down):

    <font color=blue> <font color=blue>Dim</font color=blue> </font color=blue> Mac As String
    <font color=blue>Dim</font color=blue> iFile as integer
    <font color=blue> <font color=blue>Dim </font color=blue> </font color=blue> Primary

    Mac = txtMac 'Contents of text box on user form
    Primary = Format(Now(),"yymmddhhmmss") 'time stamp
    iFile=FreeFile()
    <font color=blue>Open </font color=blue> "MyCSV File location on the network" for Append AS #iFile
    <font color=blue>Write</font color=blue> #iFile,Primary,Mac
    <font color=blue>Close</font color=blue> #iFile
    End Sub

    Jerry
    Jerry

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Finding the network (VB6)

    Logically, if you can't see the network, you can't save a file there. The local machine is normally blind to the network by design. Your best bet might be to write the data to a local text file temporarily.
    Charlotte

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Finding the network (VB6)

    To add to Charlotte's suggestion, have them carry around a USB flash memory "drive" that contains the script and can store the files. Best justification I've ever seen for such a device.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Finding the network (VB6)

    Hi There

    thanks for the reply, your idea was my fall back if there were not any suggestions. The PC's they are building will have an A, C and D drive so I was thinking along the lines of pumping the data to a floppy, but as they have USB sticks, I may as well go for that one.

    Cheers

    Jerry
    Jerry

  5. #5
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Finding the network (VB6)

    Thanks Charlotte

    As I guessed. I was thinking along the lines of what jscher2000 suggested, but have now updated the form so that the tech guys can choose the drive they want to save it too. Either the Floppy or their USB (if he hasn't forgotten it as per usual!!!!). My reasoning was in case they make a build that has extra drives outside he norm of A,C and D

    Jerry
    Jerry

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •