Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Small Business Server
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags: , ,

Sponsored Links



Automating network printer and mapped drives

Small Business Server


Reply
 
Thread Tools Search this Thread
  #1  
Old 22-02-2009
Member
 
Join Date: Feb 2009
Posts: 6
Automating network printer and mapped drives

Hi, first of all I am in no means a network administrator, I am a .net developer and was told that I am now going to manage the servers and all that goes with them... So with that said, I am hoping someone can help me out.

I have to set up a certain set of mapped drives and network printers on all of the workstations... there's like 25 of them... I know there is a way to create a batch file or something to automatically create those mapped network drives and network printers, but I'm not sure how to start... I'm running SBS 2003 Standard with all XP Pro workstations...
Reply With Quote
  #2  
Old 22-02-2009
Leythos
 
Posts: n/a
Re: Automating network printer and mapped drives

In article <webwired.3nzgnc@DoNotSpam.com>,
webwired.3nzgnc@DoNotSpam.com says...
> I have to set up a certain set of mapped drives and network printers on
> all of the workstations... there's like 25 of them... I know there is a
> way to create a batch file or something to automatically create those
> mapped network drives and network printers, but I'm not sure how to
> start... I'm running SBS 2003 Standard with all XP Pro workstations...
>


LOGON.BAT could be added to a group-policy and then you could map the
shares via that bat file each time they connect.

I normally delete a mapped drive in the bat file and then map it in the
next line - if you try and map a drive that is already mapped it won't
map it - can lead to confusion if the old map was to someplace other
than where you wanted it.

The SBS logon script should automatically install ANY printers that are
shared from the SBS server each time they logon.....



--
- Igitur qui desiderat pacem, praeparet bellum.
- Calling an illegal alien an "undocumented worker" is like calling a
drug dealer an "unlicensed pharmacist"
spam999free@rrohio.com (remove 999 for proper email address)
Reply With Quote
  #3  
Old 22-02-2009
Russ \(www.SBITS.Biz\)
 
Posts: n/a
Re: Automating network printer and mapped drives

Here's an example of a SBS_LOGIN_SCRIPT.Bat
In this example SBS2003 is the name of the server.
File Located at \\sbs2003\NETLOGON
You can get really fancy but this is a basic one.
------------------------------------------------------------
@ECHO OFF
echo Hello %USERNAME%, welcome to the network!
echo By accessing this system you agree to all rules set forth by the
company.
echo You are accessing the network from computer %COMPUTERNAME%
echo And you are running the %OS% os.
echo Please wait, authenticating %USERNAME% with DOMAIN

REM SBS Setup Script (Installed By SBS)
\\SBS2003\Clients\Setup\setup.exe /s SBS2003

REM Flush DNS (Not Needed but sometimes good in new installations)
ipconfig /flushdns

REM Force Time Set (Not really required but sometimes good in new
installations)
net time \\SBS2003 /set /yes

REM (Drive Mappings Below)

net use p: /del /yes
if not exist p:\nul net use p: "\\SBS2003\Users\%username%"

net use u: /del /yes
if not exist u:\nul net use u: \\SBS2003\Users

net use w: /del /yes
if not exist w:\nul net use w: \\SBS2003\CompanyFiles

net use x: /del /yes
if not exist x:\nul net use x: \\SBS2003\ClientApps

net use y: /del /yes
if not exist y:\nul net use y: \\SBS2003\Accounting

net use z: /del /yes
if not exist z:\nul net use z: \\SBS2003\TempWork

-----------------------------------------------------------------
But there are Tons of Options

Russ

--
Russell Grover - SBITS.Biz
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz


"Leythos" <spam999free@rrohio.com> wrote in message
news:MPG.240a6f7b26674d4398996a@us.news.astraweb.com...
> In article <webwired.3nzgnc@DoNotSpam.com>,
> webwired.3nzgnc@DoNotSpam.com says...
>> I have to set up a certain set of mapped drives and network printers on
>> all of the workstations... there's like 25 of them... I know there is a
>> way to create a batch file or something to automatically create those
>> mapped network drives and network printers, but I'm not sure how to
>> start... I'm running SBS 2003 Standard with all XP Pro workstations...
>>

>
> LOGON.BAT could be added to a group-policy and then you could map the
> shares via that bat file each time they connect.
>
> I normally delete a mapped drive in the bat file and then map it in the
> next line - if you try and map a drive that is already mapped it won't
> map it - can lead to confusion if the old map was to someplace other
> than where you wanted it.
>
> The SBS logon script should automatically install ANY printers that are
> shared from the SBS server each time they logon.....
>
>
>
> --
> - Igitur qui desiderat pacem, praeparet bellum.
> - Calling an illegal alien an "undocumented worker" is like calling a
> drug dealer an "unlicensed pharmacist"
> spam999free@rrohio.com (remove 999 for proper email address)



Reply With Quote
  #4  
Old 22-02-2009
Russ \(www.SBITS.Biz\)
 
Posts: n/a
Re: Automating network printer and mapped drives

Oh and webwired
Since this is SBS2003 you don't have to edit a GP to add the
SBS_LOGIN_SCRIPT.bat
Just edit the .bat file and assuming you set up users with wizards
everything should work just fine.

Russ

--
Russell Grover - SBITS.Biz
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz


"Russ (www.SBITS.Biz)" <support@REMOVETHIS.sbits.biz> wrote in message
news:%23FtdhGJlJHA.1184@TK2MSFTNGP04.phx.gbl...
> Here's an example of a SBS_LOGIN_SCRIPT.Bat
> In this example SBS2003 is the name of the server.
> File Located at \\sbs2003\NETLOGON
> You can get really fancy but this is a basic one.
> ------------------------------------------------------------
> @ECHO OFF
> echo Hello %USERNAME%, welcome to the network!
> echo By accessing this system you agree to all rules set forth by the
> company.
> echo You are accessing the network from computer %COMPUTERNAME%
> echo And you are running the %OS% os.
> echo Please wait, authenticating %USERNAME% with DOMAIN
>
> REM SBS Setup Script (Installed By SBS)
> \\SBS2003\Clients\Setup\setup.exe /s SBS2003
>
> REM Flush DNS (Not Needed but sometimes good in new installations)
> ipconfig /flushdns
>
> REM Force Time Set (Not really required but sometimes good in new
> installations)
> net time \\SBS2003 /set /yes
>
> REM (Drive Mappings Below)
>
> net use p: /del /yes
> if not exist p:\nul net use p: "\\SBS2003\Users\%username%"
>
> net use u: /del /yes
> if not exist u:\nul net use u: \\SBS2003\Users
>
> net use w: /del /yes
> if not exist w:\nul net use w: \\SBS2003\CompanyFiles
>
> net use x: /del /yes
> if not exist x:\nul net use x: \\SBS2003\ClientApps
>
> net use y: /del /yes
> if not exist y:\nul net use y: \\SBS2003\Accounting
>
> net use z: /del /yes
> if not exist z:\nul net use z: \\SBS2003\TempWork
>
> -----------------------------------------------------------------
> But there are Tons of Options
>
> Russ
>
> --
> Russell Grover - SBITS.Biz
> Microsoft Gold Certified Partner
> Microsoft Certified Small Business Specialist
> World Wide 24hr SBS Remote Support - http://www.SBITS.Biz
>
>
> "Leythos" <spam999free@rrohio.com> wrote in message
> news:MPG.240a6f7b26674d4398996a@us.news.astraweb.com...
>> In article <webwired.3nzgnc@DoNotSpam.com>,
>> webwired.3nzgnc@DoNotSpam.com says...
>>> I have to set up a certain set of mapped drives and network printers on
>>> all of the workstations... there's like 25 of them... I know there is a
>>> way to create a batch file or something to automatically create those
>>> mapped network drives and network printers, but I'm not sure how to
>>> start... I'm running SBS 2003 Standard with all XP Pro workstations...
>>>

>>
>> LOGON.BAT could be added to a group-policy and then you could map the
>> shares via that bat file each time they connect.
>>
>> I normally delete a mapped drive in the bat file and then map it in the
>> next line - if you try and map a drive that is already mapped it won't
>> map it - can lead to confusion if the old map was to someplace other
>> than where you wanted it.
>>
>> The SBS logon script should automatically install ANY printers that are
>> shared from the SBS server each time they logon.....
>>
>>
>>
>> --
>> - Igitur qui desiderat pacem, praeparet bellum.
>> - Calling an illegal alien an "undocumented worker" is like calling a
>> drug dealer an "unlicensed pharmacist"
>> spam999free@rrohio.com (remove 999 for proper email address)

>
>



Reply With Quote
  #5  
Old 22-02-2009
Member
 
Join Date: Feb 2009
Posts: 6
Re: Automating network printer and mapped drives

Quote:
Oh and webwired
Since this is SBS2003 you don't have to edit a GP to add the
SBS_LOGIN_SCRIPT.bat
Just edit the .bat file and assuming you set up users with wizards
everything should work just fine.
The problem is that I didn't set anything up on the server... it's all been done since 2003 when they first got it... I'm not really sure how they set up the groups and policies... Like when I added myself to the server, I just went into the Active Directory I think it was called, copied a profile of a person that used to be there as an administrator and put in my info... it was pretty easy...

I was just thinking about a script file or batch file that I could run once on the workstations to set up all of the mapped drives and network printers... I'll do some googling about how to go about creating a batch file... to put in the sample code that you have provided, modifying it of course to match my own needs...
Reply With Quote
  #6  
Old 22-02-2009
Russ \(www.SBITS.Biz\)
 
Posts: n/a
Re: Automating network printer and mapped drives

With SBS 2003 always use the wizards when they are availble
Adding users is just one example.
Assuming the other users were set up correctly
just edit that login script
if it doesn't apply you can do a couple of things.

However I HIGHLY Suggest you get this book

Microsoft Windows Small Business Server 2003 R2 Administrator's Companion
(Pro-Administrator's Companion) (Hardcover)
http://www.amazon.com/Microsoft-Busi...1290449&sr=8-1

In addition Read this before making changes (THIS IS FREE)
http://download.microsoft.com/downlo...4/SBSITPRO.doc

I also Highly Suggest getting someone to be your IT Consultant, it's best
not to do these things alone :)

Russ

--
Russell Grover - SBITS.Biz
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz


"webwired" <webwired.3nzrra@DoNotSpam.com> wrote in message
news:webwired.3nzrra@DoNotSpam.com...
>
>> Oh and webwired
>> Since this is SBS2003 you don't have to edit a GP to add the
>> SBS_LOGIN_SCRIPT.bat
>> Just edit the .bat file and assuming you set up users with wizards
>> everything should work just fine.

>
> The problem is that I didn't set anything up on the server... it's all
> been done since 2003 when they first got it... I'm not really sure how
> they set up the groups and policies... Like when I added myself to the
> server, I just went into the Active Directory I think it was called,
> copied a profile of a person that used to be there as an administrator
> and put in my info... it was pretty easy...
>
> I was just thinking about a script file or batch file that I could run
> once on the workstations to set up all of the mapped drives and network
> printers... I'll do some googling about how to go about creating a batch
> file... to put in the sample code that you have provided, modifying it
> of course to match my own needs...
>
>
> --
> webwired
> ------------------------------------------------------------------------
> webwired's Profile: http://forums.techarena.in/members/webwired.htm
> View this thread:
> Automating network printer and mapped drives
>
> http://forums.techarena.in
>



Reply With Quote
  #7  
Old 22-02-2009
Member
 
Join Date: Feb 2009
Posts: 6
Re: Automating network printer and mapped drives

Quote:
However I HIGHLY Suggest you get this book

Microsoft Windows Small Business Server 2003 R2 Administrator's Companion
(Pro-Administrator's Companion) (Hardcover)
http://www.amazon.com/Microsoft-Busi...90449&sr= 8-1

In addition Read this before making changes (THIS IS FREE)
http://download.microsoft.com/downlo...4/SBSITPRO.doc

I also Highly Suggest getting someone to be your IT Consultant, it's best
not to do these things alone :)
Thank you for the book suggestions, I have been looking for a couple that could help me out...

Trust me, I did lobby for RackSpace to run and manage our Exchange server and new application server that I'll be developing on... but even though I showed a list of benefits for doing it that way and virtually none if we had it in house, they still wanted to keep it all in house...
Reply With Quote
  #8  
Old 22-02-2009
Leythos
 
Posts: n/a
Re: Automating network printer and mapped drives

In article <ei3Q4LJlJHA.4404@TK2MSFTNGP04.phx.gbl>,
support@REMOVETHIS.sbits.biz says...
> Oh and webwired
> Since this is SBS2003 you don't have to edit a GP to add the
> SBS_LOGIN_SCRIPT.bat
> Just edit the .bat file and assuming you set up users with wizards
> everything should work just fine.


No, you don't, but the LOGON and LOGOFF GPO settings are very nice for
many things and a log of new people never learn about them.

--
- Igitur qui desiderat pacem, praeparet bellum.
- Calling an illegal alien an "undocumented worker" is like calling a
drug dealer an "unlicensed pharmacist"
spam999free@rrohio.com (remove 999 for proper email address)
Reply With Quote
  #9  
Old 23-02-2009
Russ \(www.SBITS.Biz\)
 
Posts: n/a
Re: Automating network printer and mapped drives

I think that's a little advanced for him..
Is why I didn't mention it...
No offense to OP
Russ

--
Russell Grover - SBITS.Biz
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz


"Leythos" <spam999free@rrohio.com> wrote in message
news:MPG.240b37edc74a0b989970@us.news.astraweb.com...
> In article <ei3Q4LJlJHA.4404@TK2MSFTNGP04.phx.gbl>,
> support@REMOVETHIS.sbits.biz says...
>> Oh and webwired
>> Since this is SBS2003 you don't have to edit a GP to add the
>> SBS_LOGIN_SCRIPT.bat
>> Just edit the .bat file and assuming you set up users with wizards
>> everything should work just fine.

>
> No, you don't, but the LOGON and LOGOFF GPO settings are very nice for
> many things and a log of new people never learn about them.
>
> --
> - Igitur qui desiderat pacem, praeparet bellum.
> - Calling an illegal alien an "undocumented worker" is like calling a
> drug dealer an "unlicensed pharmacist"
> spam999free@rrohio.com (remove 999 for proper email address)



Reply With Quote
  #10  
Old 23-02-2009
Russ \(www.SBITS.Biz\)
 
Posts: n/a
Re: Automating network printer and mapped drives

I actually think in house is better for a SBS server,
But then I'm BIASED in that area.
(The clients that I have that are using Hosted Exchange, don't like it.)

Russ :)

--
Russell Grover - SBITS.Biz
Microsoft Gold Certified Partner
Microsoft Certified Small Business Specialist
World Wide 24hr SBS Remote Support - http://www.SBITS.Biz


"webwired" <webwired.3o0jjc@DoNotSpam.com> wrote in message
news:webwired.3o0jjc@DoNotSpam.com...
>
>> However I HIGHLY Suggest you get this book
>>
>> Microsoft Windows Small Business Server 2003 R2 Administrator's
>> Companion
>> (Pro-Administrator's Companion) (Hardcover)
>> http://www.amazon.com/Microsoft-Busi...90449&sr= 8-1
>>
>> In addition Read this before making changes (THIS IS FREE)
>> http://download.microsoft.com/downlo...4/SBSITPRO.doc
>>
>> I also Highly Suggest getting someone to be your IT Consultant, it's
>> best
>> not to do these things alone :)

>
> Thank you for the book suggestions, I have been looking for a couple
> that could help me out...
>
> Trust me, I did lobby for RackSpace to run and manage our Exchange
> server and new application server that I'll be developing on... but even
> though I showed a list of benefits for doing it that way and virtually
> none if we had it in house, they still wanted to keep it all in house...
>
>
> --
> webwired
> ------------------------------------------------------------------------
> webwired's Profile: http://forums.techarena.in/members/webwired.htm
> View this thread:
> Automating network printer and mapped drives
>
> http://forums.techarena.in
>



Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Small Business Server


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Automating network printer and mapped drives"
Thread Thread Starter Forum Replies Last Post
Internet Explorer 8: Unable to view .mht file but can be seen in mapped network drives Rufta Technology & Internet 4 19-02-2011 10:32 AM
Windows 7 mapped network drives locking explorer up teena_pansare Operating Systems 5 06-04-2010 04:59 PM
Mapped drives vs. UNC paths Jeff Johnson Windows Server Help 10 11-12-2009 01:16 AM
Mapped Network Drives not connecting over VPN Don Devenney Windows Vista Network 5 17-04-2009 11:35 AM
Network mapped drives showing disconnected FSN Tech Windows Server Help 0 21-05-2008 10:15 PM


All times are GMT +5.5. The time now is 09:52 AM.