Batch files that work on W7 but not W10


  1. Posts : 426
    Win7 Ultimate SP1
       #1

    Batch files that work on W7 but not W10


    If I open my Win7 computer's Network and Sharing Center and click 'Change adapter settings', I see an icon of two computer monitors, with the label 'Local Area Connection 2'.

    A couple of years back, with the aid of some kind folks here, I set up two batch files to Enable and Disable 'Local Area Connection 2'. They both work well. The 'Disable' bat works via Task Scheduler at 1.00am, the Enable bat I activate manually in the morning. The batch commands read "netsh interface set interface "Local Area Connection 2" enable" and similar for the disable bat.

    A couple of months ago I started to build an experimental W10 Pro computer, mainly to see if I could tweak it into a state that closely resembles my W7 machine. Just now I tried to set up the exact same two batch commands as are running on the W7 pc, on the W10 machine, with the slightly different target of "Ethernet", which is the name I found in 'Change adapter settings' folder in W10.

    But, on the Windows 10 computer, these batch files don't work, even with UAC turned off.

    However I made two desktop shortcuts that DO work. The text (found online) I entered when asked to 'Type the location of the item" reads: netsh interface set interface name="yourname" admin = disabled. After substituting 'Ethernet' for 'yourname' both shortcuts work, although they take a second or two to activate. Opening them again now, the full paths read:
    C:\System32\netsh.exe netsh interface set interface name="Ethernet" admin = disabled (or enabled)

    I'm curious as to why the simpler W7 batch files don't work on the 10 machine. Anyone have a clue?
      My Computer


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

    Without seeing the actual bat files it's impossible to know, and generally that's a part of Windows that hasn't changed a lot (if at all) in any recent and not so recent version.

    First of all, what error messaage do you get?

    My blind guess goes for an incorrect network name or something like that, very machine-specific that's not got changed.
      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:23.
Find Us