+ Post New Thread
Results 1 to 10 of 10
Windows Server 2000/2003 Thread, Evil rumour? .bat vs .vbs for logon drive mapping... in Technical; Morning. Just tinkering with my new domain here and giving some thought to mapping drives for staff at logon. I ...
  1. #1

    Miscbrah's Avatar
    Join Date
    Dec 2011
    Posts
    868
    Thank Post
    241
    Thanked 240 Times in 144 Posts
    Rep Power
    112

    Evil rumour? .bat vs .vbs for logon drive mapping...

    Morning.

    Just tinkering with my new domain here and giving some thought to mapping drives for staff at logon. I SEEM to remember from my hazy and distant technician past some wise old sage telling me NOT to use batch files full of 'net use wossname' to map drives, and instead use vbs scripts full of 'objNetwork.MapNetworkDrive wossname' with the thinking being that loads of staff calling this single batch file is worse than loads of staff calling a vbs file.

    Is this true or is this not true and neither is better/worse? We're not on Win7 JUST yet, so this is me keeping it XP friendly until the summer...

    Anyone feel like mythbusting for me?

    Cheers!

  2. #2

    Join Date
    Mar 2010
    Location
    Leeds
    Posts
    418
    Thank Post
    77
    Thanked 46 Times in 41 Posts
    Rep Power
    17
    we use a bat file and have no issues whatsoever.

  3. Thanks to jonnykewell1 from:

    Miscbrah (21st February 2012)

  4. #3

    Miscbrah's Avatar
    Join Date
    Dec 2011
    Posts
    868
    Thank Post
    241
    Thanked 240 Times in 144 Posts
    Rep Power
    112
    Quote Originally Posted by jonnykewell1 View Post
    we use a bat file and have no issues whatsoever.
    Thanks fellow MCDST!

  5. #4

    Join Date
    Mar 2010
    Location
    Leeds
    Posts
    418
    Thank Post
    77
    Thanked 46 Times in 41 Posts
    Rep Power
    17
    hahaha

  6. #5

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,241
    Thank Post
    239
    Thanked 1,567 Times in 1,249 Posts
    Rep Power
    339
    There's no difference. You can write a single .bat or .vbs file so all staff are using the same file at logon.

    When you deloy a 2008 R2 server, along with XP/7 clients, you can deploy network drives via GPO. I no longer have any logon scripts, only a couple of Startup scripts which install anti-virus (if not installed) and deploy wireless configuration settings if not installed.

    The only catch with XP is you must ensure KB934729 is installed, otherwise it will fail. You can deploy this with WSUS. Windows 7 will work with GPP out the box.

  7. Thanks to Michael from:

    Miscbrah (21st February 2012)

  8. #6

    Join Date
    Dec 2007
    Posts
    863
    Thank Post
    90
    Thanked 164 Times in 139 Posts
    Rep Power
    49
    Quote Originally Posted by Michael View Post
    There's no difference. You can write a single .bat or .vbs file so all staff are using the same file at logon.

    When you deloy a 2008 R2 server, along with XP/7 clients, you can deploy network drives via GPO. I no longer have any logon scripts, only a couple of Startup scripts which install anti-virus (if not installed) and deploy wireless configuration settings if not installed.

    The only catch with XP is you must ensure KB934729 is installed, otherwise it will fail. You can deploy this with WSUS. Windows 7 will work with GPP out the box.
    Ditto here.

  9. #7
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,738
    Thank Post
    894
    Thanked 414 Times in 348 Posts
    Blog Entries
    12
    Rep Power
    85
    Quote Originally Posted by Michael View Post
    and deploy wireless configuration settings if not installed.
    Thats quite cool, any chance of a sample script?

    I always wondered if you could set the wireless settings up using a script.

  10. #8

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,241
    Thank Post
    239
    Thanked 1,567 Times in 1,249 Posts
    Rep Power
    339
    Have a look here. The only catch is only Windows Vista, Windows Server 2008, Windows 7 and Windows Server 2008 R2 support the netsh wlan command.

    XP does not recognise this command, (even if you set it to deploy) it would just be ignored.

  11. Thanks to Michael from:

    zag (21st February 2012)

  12. #9

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,241
    Thank Post
    239
    Thanked 1,567 Times in 1,249 Posts
    Rep Power
    339
    The only other catch is the computer in question must be plugged in via Ethernet once to receive the wireless configuration. After this it will work wirelessly.

    By setting the policy and linking it, then typically imaging, running Sysprep and joining the domain, the computer must be plugged in via Ethernet first time anyway, so this just saves an additional job setting the wireless config manually.

  13. #10

    Miscbrah's Avatar
    Join Date
    Dec 2011
    Posts
    868
    Thank Post
    241
    Thanked 240 Times in 144 Posts
    Rep Power
    112
    Quote Originally Posted by Michael View Post
    There's no difference. You can write a single .bat or .vbs file so all staff are using the same file at logon.

    When you deloy a 2008 R2 server, along with XP/7 clients, you can deploy network drives via GPO. I no longer have any logon scripts, only a couple of Startup scripts which install anti-virus (if not installed) and deploy wireless configuration settings if not installed.

    The only catch with XP is you must ensure KB934729 is installed, otherwise it will fail. You can deploy this with WSUS. Windows 7 will work with GPP out the box.
    bertstare.jpg

    I had NO idea! I'm installing that sod immediately.

    TA!!!

SHARE:
+ Post New Thread

Similar Threads

  1. SSD vs HDD For A Servers Primary Boot Drive
    By SYSMAN_MK in forum Hardware
    Replies: 18
    Last Post: 12th July 2011, 02:48 PM
  2. Users as local admins for logon script?
    By actech in forum Windows
    Replies: 12
    Last Post: 14th May 2008, 08:04 PM
  3. Stop users closing bat/cmd shell at logon
    By apeo in forum How do you do....it?
    Replies: 10
    Last Post: 8th May 2007, 12:37 PM
  4. bat versus vbs
    By Uraken in forum Scripts
    Replies: 8
    Last Post: 30th January 2007, 10:41 PM
  5. Replies: 7
    Last Post: 27th November 2006, 11:26 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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