Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • September 25, 2016, 05:36:00 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: auto switching of network drive mapping  (Read 1896 times)

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 498
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
auto switching of network drive mapping
« on: December 17, 2014, 01:04:55 PM »
I know here is a way to do this.  There may be both a commercial program as well as a simpler method but i have seen it somewhere.
When users are Inside4 an office network they have access to a folder on a server that is mapped as a local network drive on the office subnet.
When they leave, they need to also access this same folder but it will be via FTP.  And in both cases the drive has to remain mapped as a specific drive letter.  That is the trick that I am having problem with.
Short of writing a script they would have to run when not in the office, I have seen a utility that can do this based on the IP address in use by the NIC. If they are on the Office IP, it maps the drive to the local IP it is on.
If they are anywhere else BUT the office IP, it can be set to use various other paths to reach that same drive.
Windows has no problem mapping it to Both a local drive letter AND a network Place Via FTP but the need is for the Drive Letter Mapping to switch from a local IP to using the Network Place sort of automatically.
Any Ideas appreciated but the key is the drive letter used MUST stay the same whether inside the office on local mapping or outside on mapped FTP access.
Thanks

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,763
    • View Profile
    • Donate to Member
Re: auto switching of network drive mapping
« Reply #1 on: December 17, 2014, 01:16:33 PM »
The trick is not to allow Windows to manage your wifi connections. Many laptops include an OEM supplied utility (usually written by Intel or done for IBM, HP, or Lenovo) that handles all this for you.

For 3rd-party, take a look at freebie/FOSS project Argon; and for "pay-for" check out NetSetMan Pro.  (~€18/$20 USD last I looked)


questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 498
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: auto switching of network drive mapping
« Reply #2 on: December 17, 2014, 02:50:25 PM »
Thanks 40hz.  I think you hit the nail on the head.  The program called NetSetMan sounds very much like it.  This was maybe a year or so ago it seems.   I was looking for the same thing then but for a slightly different reason.

By the way, do you happen to know WHY I can map a drive letter to an FTP drive using NETDRIVE2 with Zero problems but cannot do the same thing with any other program.  WEB-DRIVE works but NETDRIVE2 is Free is used for only 1 drive (it says).  Windows also "says" it can map to an FTP with no problem and it appears to allow you to do so but when done, you still only have the old "network place" as always.

There has to be some simple tweak to the ftp settings because that is all I need.  I know that it took me forever to figure out the trick to getting a mapped drive to Windows OneDrive.   It was all in how you worded the connect string PLUS you  had to add the site to IE's SAFE SITES and I am starting to wonder id UAC has anything to do with it.

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,763
    • View Profile
    • Donate to Member
Re: auto switching of network drive mapping
« Reply #3 on: December 17, 2014, 08:28:51 PM »
By the way, do you happen to know WHY I can map a drive letter to an FTP drive using NETDRIVE2 with Zero problems but cannot do the same thing with any other program.

Not really sure. Have you ever tried Ferro Backup's freebie FtpUse ?

superboyac

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 6,070
  • Is your software in my list?
    • View Profile
    • Donate to Member
Re: auto switching of network drive mapping
« Reply #4 on: December 17, 2014, 08:46:32 PM »
The trick is not to allow Windows to manage your wifi connections. Many laptops include an OEM supplied utility (usually written by Intel or done for IBM, HP, or Lenovo) that handles all this for you.

For 3rd-party, take a look at freebie/FOSS project Argon; and for "pay-for" check out NetSetMan Pro.  (~€18/$20 USD last I looked)


I just discovered Netsetman a few days ago to deal with my portable wifi drive problem...I'll have to update my other thread on that.  But I love it, very handy.

questorfla

  • Supporting Member
  • Joined in 2012
  • **
  • Posts: 498
  • Fighting Slime all the Time
    • View Profile
    • Donate to Member
Re: auto switching of network drive mapping
« Reply #5 on: December 18, 2014, 12:54:20 AM »
Oh well.  Backup and Punt on both fronts I guess.  :-\ :(

NetSetMan looks good in description and maybe it is just me but it hit all around the problem without actually giving me what I need.  I have seen such a program somewhere that is like a pumped up version of netsetman.  I remember it allowing you to set up such a way that even included what printer would be the default for a given profile.  I guess i can write s imple script with net use to kill the one mapping path and use the other.  But Hope Springs Eternal.  Maybe... It's outr there somewhere.  Because its a little more complicated than that.  

While in office it has to use an actual mapped network drive to get to R: , if NOT in the office, it has to run NETDRIVE2 to create the FTP mapping for the exact same drive letter but get there with FTP.  I have already played enough with netdrive to know that it isn't happy if there are any leftover maps that USED to be connected to that same setup with normal networking

I am tempted to try amputating "mountpoints2" from the registry before letting netdrive even run. It just gets recreated anyway.
 
These are people who I guarantee will shut the lid on their laptop putting it to sleep and while it "dreams" about the old "\\10.0\x.x.x\sharedfolder" connection being mapped to R: and wakes up in a Radison Inne somewhere, connects to a 192.168.1.x dhcp and cant find the way to get to the files on R:.  In their case, NetDrive2 won't even run automatically since they never turned the sytem off.,  ANd if they RUN it, it will try to do a real FTP connect to the Server's Working FTP connecton but fail because the internal Windows config still shows the user connected via another method (The old 10.x.x.x\sharedfolder).  

So it gives an error report which no one will understand.  EASY to fix.  IF! they Reboot.  But they won't.  :(  A scripted app to close the old drive setup and /Disconnect and remove it completely is probably the only sure way.  Then continue run Netdrive2 which will have no problem making the FTP connection to the public IP.  Either way, it is the SAME files on the SAME Server.  I just have to get them in through a different type of door.  FTP has checked out so far to work every time at any location so it beats out trying VPN's that connect every time but wont allow a mapped drive letter much of the time, giving only a "network Place".  This used to be so simple to map drive letters over IP across the net.  Those were the days.  I can also add in the removal of the primary printer so they can grab whatever is where they are because most of them don't know that the default printer STAYS as the defrault printer until they change it.  That is a feature you would think MS would have already added.  Maybe by Windows 14.  ?  
Sometimes I feel like I work for a 3rd World (no  make that 4th or 5th world) company where technology has yet to arrive and most are better off with pencils and REAL "Paper Notepads"  not "Notebooks".  If I told them i could get cheap paper "notepads" that had an unlimited Battery Run time they would jump all over that before anyone ever figured it out..


« Last Edit: December 18, 2014, 01:02:39 AM by questorfla »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,394
    • View Profile
    • Donate to Member
Re: auto switching of network drive mapping
« Reply #6 on: December 18, 2014, 03:50:17 AM »
Can you not use Task Scheduler to execute a script to demap the drive when the computer goes to Sleep and/or Shutdown?

2014-12-18 20_48_29.pngauto switching of network drive mapping

I made an EventLog filter back here for power events if you want to check the Event ID.

It would seem to be the simplest method.

You could probably use the Task Scheduler to run a script on wake up to check whether it's connected to the work LAN or not and run following mappings/commands as appropriate.
« Last Edit: December 18, 2014, 04:02:53 AM by 4wd »