Emulating a Network Drive on a PC


  1. Posts : 2
    Windows 7 Professional
       #1

    Emulating a Network Drive on a PC


    I have an Access database at work that has a lot of VBA code, which frequently accesses data on my server at work. It uses the full path to access network drives eg DataFolder = "\\MainServer\WorkData\". I want to do some development on my home PC, but obviously I don't have the work network available at home, so none of the code that accesses network drives will work. Is there a way I can setup a folder such that it looks like a network drive? Eg when the code looks for \\MainServer\WorkData\, it finds the local folder. I've seen lots of stuff on the Web about doing it the other way round ie make a network drive look like a local drive, but nothing about making a local drive (or folder) look like a network drive.
      My Computer


  2. Posts : 6,330
    Multi-Boot W7_Pro_x64 W8.1_Pro_x64 W10_Pro_x64 +Linux_VMs +Chromium_VM
       #2

    Maybe the Microsoft Loopback Adapter will work for what you want ?
    Take a look at these articles:
    https://support.microsoft.com/en-us/kb/236869
    https://social.technet.microsoft.com...tpronetworking

    If that doesn't help, maybe installing a Virtual Machine is something you could try ?
      My Computer


  3. Posts : 2,468
    Windows 7 Ultimate x64
       #3

    You just follow the very same procedure as if it was a network share, but doing it entirely local. Like every server, the SMB shares can be accessed from the server computer itself, just using the standard loopback interface.

    Just create a share in your own machine, then you can access it from within that same machine using the localhost host (computer name or local IP also work, of course):

    \\127.0.0.1\WorkData
    \\localhost\WorkData

    And it will behave pretty much in the same way as any other share on remote systems.
    Then configure your program to point to those and you can test it entirely on local system without any network.
      My Computer


  4. Posts : 2
    Windows 7 Professional
    Thread Starter
       #4

    Close....!


    Hi Alejandro85. Thanks for the suggestion. I've made an entry in my hosts file as follows:

    127.0.0.1 MyServer

    I can then ping MyServer and get 'Reply from 127.0.0.1: bytes=32 time<1ms TTL=128', so looks good.

    I've then setup a shared folder, with permissions for everyone. I can successfully access it with \\localhost\MyFolder and \\127.0.0.1\MyFolder. However, when I try \\MyServer\MyFolder (which is what I want to do), I get an 'Enter Network Password' dialog. If I enter my logon name and password, it doesn't accept it. If I turn off Password Protected Sharing, I still get the network password dialog. I've checked the share and folder permissions and they're fine.

    I'm obviously missing something. Any ideas?

    Phil.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 20:05.
Find Us