Home All Groups Group Topic Archive Search About

Drive Mapping in Server 2008

Author
24 Mar 2009 4:12 PM
Dave
I haven't played with Server since 2000.  I'm trying to setup a
machine for my neighbor and I'd like to map drives to specific shared
folders.  In the past I would do this in a .BAT file.  If this is
still the prefered practice where does the file go now.  If not...what
is the prefered practice, and can you point me to any documentation.

Since time is a factor, and it is a very small outfit, if a batch file
still works, I'd prefer to do that.


Thanks for your help.

Author
24 Mar 2009 4:41 PM
Richard Mueller [MVP]
"Dave" <Dave.Burk***@Jacobs.com> wrote in message
news:98a2884d-9e54-4ef9-b771-9d300046b396@c18g2000prh.googlegroups.com...
>I haven't played with Server since 2000.  I'm trying to setup a
> machine for my neighbor and I'd like to map drives to specific shared
> folders.  In the past I would do this in a .BAT file.  If this is
> still the prefered practice where does the file go now.  If not...what
> is the prefered practice, and can you point me to any documentation.
>
> Since time is a factor, and it is a very small outfit, if a batch file
> still works, I'd prefer to do that.
>
>
> Thanks for your help.

This FAQ might help if you mean to use your batch file as a logon script and
you use Active Directory:

http://www.rlmueller.net/LogonScriptFAQ.htm

If you are using local accounts only (no AD domain), you can assign logon
scripts to the local user accounts. The batch file syntax is unchanged to
map drives.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--
Are all your drivers up to date? click for free checkup

Author
24 Mar 2009 5:32 PM
Dave
Thanks Richard!
Still no luck.
This is a 2008 machine that Active Directory has been setup on.  I'm
using the following Logon Script path in user profile:

    %SystemRoot%\sysvol\sysvol\TriR.Com\scripts\TriR.Bat

My batch file is:

    @Echo Off
    REM TriR.Bat Version 1.0
    REM Exit if user has logged on to the server
    IF %ComputerName%==TriR2k801. Goto End
    REM Delete pre-existing drive mappings
    NET USE F: /DELETE >null
    NET USE H: /DELETE >null
    NET USE P: /DELETE >null
    NET USE S: /DELETE >null
    NET USE U: /DELETE >null
    REM MAP DRIVES
    NET USE F: \\TriR2k801\Finance$ >null
    NET USE H: \\TriR2k801\HR$ >null
    NET USE P: \\TriR2k801\Projects$ >null
    NET USE S: \\TriR2k801\Safety$ >null
    NET USE U: \\TriR2k801\Users$\%UserName%
    REM SYNCHRONIZE TIME WITH SERVER
    NET TIME \\TRIR2K801 /SET /YES

When I log in the only drive mapped is U:  But that's probably because
I have that declared under Home Folder.




On Mar 24, 11:41 am, "Richard Mueller [MVP]" <rlmueller-
nos...@ameritech.nospam.net> wrote:
Show quoteHide quote
> "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> news:98a2884d-9e54-4ef9-b771-9d300046b396@c18g2000prh.googlegroups.com...
>
> >I haven't played with Server since 2000.  I'm trying to setup a
> > machine for my neighbor and I'd like to map drives to specific shared
> > folders.  In the past I would do this in a .BAT file.  If this is
> > still the prefered practice where does the file go now.  If not...what
> > is the prefered practice, and can you point me to any documentation.
>
> > Since time is a factor, and it is a very small outfit, if a batch file
> > still works, I'd prefer to do that.
>
> > Thanks for your help.
>
> This FAQ might help if you mean to use your batch file as a logon script and
> you use Active Directory:
>
> http://www.rlmueller.net/LogonScriptFAQ.htm
>
> If you are using local accounts only (no AD domain), you can assign logon
> scripts to the local user accounts. The batch file syntax is unchanged to
> map drives.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
Author
24 Mar 2009 5:58 PM
Richard Mueller [MVP]
It seems your logon script is not running at all. On the Profile tab of the
user properties in ADUC, for logon script enter simply:

TriR.bat

Should it be:

    IF %ComputerName%==TriR2k801 Goto End

Also, it should be unnecessary to synchronize the time. It should happen
when the computer starts. For troubleshooting you might add statements to
log steps in a local text file. For example:

    @Echo Off
    echo Start Logon Script>c:\LogonLog.log
    REM TriR.Bat Version 1.0
    REM Exit if user has logged on to the server
    IF %ComputerName%==TriR2k801 Goto End
    REM Delete pre-existing drive mappings
    echo Remove mappings>>c:\LogonLog.log
    NET USE F: /DELETE >null
    NET USE H: /DELETE >null
    NET USE P: /DELETE >null
    NET USE S: /DELETE >null
    NET USE U: /DELETE >null
    REM MAP DRIVES
    echo Map drive F:>>c:\LogonLog.log
    NET USE F: \\TriR2k801\Finance$ >null
    echo Map drive H:>>c:\LogonLog.log
    NET USE H: \\TriR2k801\HR$ >null
    echo Map drive P:>>c:\LogonLog.log
    NET USE P: \\TriR2k801\Projects$ >null
    echo Map drive S:>>c:\LogonLog.log
    NET USE S: \\TriR2k801\Safety$ >null
    echo Map drive U:>>c:\LogonLog.log
    NET USE U: \\TriR2k801\Users$\%UserName%

Or, instead of redirecting the output of the NET USE commands to Null,
redirect to the log file. If the log file is not created, you know the logon
script did not run at all. Otherwise, you might find a statement raises an
error.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"Dave" <Dave.Burk***@Jacobs.com> wrote in message
news:8b5fc1c4-2fc1-4196-a645-f5df41076d25@v35g2000pro.googlegroups.com...
Thanks Richard!
Still no luck.
This is a 2008 machine that Active Directory has been setup on.  I'm
using the following Logon Script path in user profile:

    %SystemRoot%\sysvol\sysvol\TriR.Com\scripts\TriR.Bat

My batch file is:

    @Echo Off
    REM TriR.Bat Version 1.0
    REM Exit if user has logged on to the server
    IF %ComputerName%==TriR2k801. Goto End
    REM Delete pre-existing drive mappings
    NET USE F: /DELETE >null
    NET USE H: /DELETE >null
    NET USE P: /DELETE >null
    NET USE S: /DELETE >null
    NET USE U: /DELETE >null
    REM MAP DRIVES
    NET USE F: \\TriR2k801\Finance$ >null
    NET USE H: \\TriR2k801\HR$ >null
    NET USE P: \\TriR2k801\Projects$ >null
    NET USE S: \\TriR2k801\Safety$ >null
    NET USE U: \\TriR2k801\Users$\%UserName%
    REM SYNCHRONIZE TIME WITH SERVER
    NET TIME \\TRIR2K801 /SET /YES

When I log in the only drive mapped is U:  But that's probably because
I have that declared under Home Folder.




On Mar 24, 11:41 am, "Richard Mueller [MVP]" <rlmueller-
nos...@ameritech.nospam.net> wrote:
Show quoteHide quote
> "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> news:98a2884d-9e54-4ef9-b771-9d300046b396@c18g2000prh.googlegroups.com...
>
> >I haven't played with Server since 2000. I'm trying to setup a
> > machine for my neighbor and I'd like to map drives to specific shared
> > folders. In the past I would do this in a .BAT file. If this is
> > still the prefered practice where does the file go now. If not...what
> > is the prefered practice, and can you point me to any documentation.
>
> > Since time is a factor, and it is a very small outfit, if a batch file
> > still works, I'd prefer to do that.
>
> > Thanks for your help.
>
> This FAQ might help if you mean to use your batch file as a logon script
> and
> you use Active Directory:
>
> http://www.rlmueller.net/LogonScriptFAQ.htm
>
> If you are using local accounts only (no AD domain), you can assign logon
> scripts to the local user accounts. The batch file syntax is unchanged to
> map drives.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
Author
24 Mar 2009 6:23 PM
Dave
When I log in I'm getting the little popup that says  "Could not
reconnect all the network drives.  Click Here...".  Look at the
command window while it's running it says Access is denied.  What
would be causing that?



On Mar 24, 12:58 pm, "Richard Mueller [MVP]" <rlmueller-
nos...@ameritech.nospam.net> wrote:
Show quoteHide quote
> It seems your logon script is not running at all. On the Profile tab of the
> user properties in ADUC, for logon script enter simply:
>
> TriR.bat
>
> Should it be:
>
>     IF %ComputerName%==TriR2k801 Goto End
>
> Also, it should be unnecessary to synchronize the time. It should happen
> when the computer starts. For troubleshooting you might add statements to
> log steps in a local text file. For example:
>
>     @Echo Off
>     echo Start Logon Script>c:\LogonLog.log
>     REM TriR.Bat Version 1.0
>     REM Exit if user has logged on to the server
>     IF %ComputerName%==TriR2k801 Goto End
>     REM Delete pre-existing drive mappings
>     echo Remove mappings>>c:\LogonLog.log
>     NET USE F: /DELETE >null
>     NET USE H: /DELETE >null
>     NET USE P: /DELETE >null
>     NET USE S: /DELETE >null
>     NET USE U: /DELETE >null
>     REM MAP DRIVES
>     echo Map drive F:>>c:\LogonLog.log
>     NET USE F: \\TriR2k801\Finance$ >null
>     echo Map drive H:>>c:\LogonLog.log
>     NET USE H: \\TriR2k801\HR$ >null
>     echo Map drive P:>>c:\LogonLog.log
>     NET USE P: \\TriR2k801\Projects$ >null
>     echo Map drive S:>>c:\LogonLog.log
>     NET USE S: \\TriR2k801\Safety$ >null
>     echo Map drive U:>>c:\LogonLog.log
>     NET USE U: \\TriR2k801\Users$\%UserName%
>
> Or, instead of redirecting the output of the NET USE commands to Null,
> redirect to the log file. If the log file is not created, you know the logon
> script did not run at all. Otherwise, you might find a statement raises an
> error.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
>
> "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> news:8b5fc1c4-2fc1-4196-a645-f5df41076d25@v35g2000pro.googlegroups.com...
> Thanks Richard!
> Still no luck.
> This is a 2008 machine that Active Directory has been setup on.  I'm
> using the following Logon Script path in user profile:
>
>     %SystemRoot%\sysvol\sysvol\TriR.Com\scripts\TriR.Bat
>
> My batch file is:
>
>     @Echo Off
>     REM TriR.Bat Version 1.0
>     REM Exit if user has logged on to the server
>     IF %ComputerName%==TriR2k801. Goto End
>     REM Delete pre-existing drive mappings
>     NET USE F: /DELETE >null
>     NET USE H: /DELETE >null
>     NET USE P: /DELETE >null
>     NET USE S: /DELETE >null
>     NET USE U: /DELETE >null
>     REM MAP DRIVES
>     NET USE F: \\TriR2k801\Finance$ >null
>     NET USE H: \\TriR2k801\HR$ >null
>     NET USE P: \\TriR2k801\Projects$ >null
>     NET USE S: \\TriR2k801\Safety$ >null
>     NET USE U: \\TriR2k801\Users$\%UserName%
>     REM SYNCHRONIZE TIME WITH SERVER
>     NET TIME \\TRIR2K801 /SET /YES
>
> When I log in the only drive mapped is U:  But that's probably because
> I have that declared under Home Folder.
>
> On Mar 24, 11:41 am, "Richard Mueller [MVP]" <rlmueller-
>
>
>
> nos...@ameritech.nospam.net> wrote:
> > "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> >news:98a2884d-9e54-4ef9-b771-9d300046b396@c18g2000prh.googlegroups.com....
>
> > >I haven't played with Server since 2000. I'm trying to setup a
> > > machine for my neighbor and I'd like to map drives to specific shared
> > > folders. In the past I would do this in a .BAT file. If this is
> > > still the prefered practice where does the file go now. If not...what
> > > is the prefered practice, and can you point me to any documentation.
>
> > > Since time is a factor, and it is a very small outfit, if a batch file
> > > still works, I'd prefer to do that.
>
> > > Thanks for your help.
>
> > This FAQ might help if you mean to use your batch file as a logon script
> > and
> > you use Active Directory:
>
> >http://www.rlmueller.net/LogonScriptFAQ.htm
>
> > If you are using local accounts only (no AD domain), you can assign logon
> > scripts to the local user accounts. The batch file syntax is unchanged to
> > map drives.
>
> > --
> > Richard Mueller
> > MVP Directory Services
> > Hilltop Lab -http://www.rlmueller.net
> > --- Hide quoted text -
>
> - Show quoted text -
Author
24 Mar 2009 9:39 PM
Richard Mueller [MVP]
Sounds like perhaps the drives were mapped persistent. I would use:

/persistent:no

in the Net Use statements. Also the user may lack permissions for some of
the shares. I would log in as the user, then run the statements one at a
time at the command prompt to determine which statement raises which error.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--

"Dave" <Dave.Burk***@Jacobs.com> wrote in message
news:34d7507e-107f-41c4-a2c7-8621978dd44c@d7g2000prl.googlegroups.com...
When I log in I'm getting the little popup that says  "Could not
reconnect all the network drives.  Click Here...".  Look at the
command window while it's running it says Access is denied.  What
would be causing that?



On Mar 24, 12:58 pm, "Richard Mueller [MVP]" <rlmueller-
nos...@ameritech.nospam.net> wrote:
Show quoteHide quote
> It seems your logon script is not running at all. On the Profile tab of
> the
> user properties in ADUC, for logon script enter simply:
>
> TriR.bat
>
> Should it be:
>
> IF %ComputerName%==TriR2k801 Goto End
>
> Also, it should be unnecessary to synchronize the time. It should happen
> when the computer starts. For troubleshooting you might add statements to
> log steps in a local text file. For example:
>
> @Echo Off
> echo Start Logon Script>c:\LogonLog.log
> REM TriR.Bat Version 1.0
> REM Exit if user has logged on to the server
> IF %ComputerName%==TriR2k801 Goto End
> REM Delete pre-existing drive mappings
> echo Remove mappings>>c:\LogonLog.log
> NET USE F: /DELETE >null
> NET USE H: /DELETE >null
> NET USE P: /DELETE >null
> NET USE S: /DELETE >null
> NET USE U: /DELETE >null
> REM MAP DRIVES
> echo Map drive F:>>c:\LogonLog.log
> NET USE F: \\TriR2k801\Finance$ >null
> echo Map drive H:>>c:\LogonLog.log
> NET USE H: \\TriR2k801\HR$ >null
> echo Map drive P:>>c:\LogonLog.log
> NET USE P: \\TriR2k801\Projects$ >null
> echo Map drive S:>>c:\LogonLog.log
> NET USE S: \\TriR2k801\Safety$ >null
> echo Map drive U:>>c:\LogonLog.log
> NET USE U: \\TriR2k801\Users$\%UserName%
>
> Or, instead of redirecting the output of the NET USE commands to Null,
> redirect to the log file. If the log file is not created, you know the
> logon
> script did not run at all. Otherwise, you might find a statement raises an
> error.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --
>
> "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> news:8b5fc1c4-2fc1-4196-a645-f5df41076d25@v35g2000pro.googlegroups.com...
> Thanks Richard!
> Still no luck.
> This is a 2008 machine that Active Directory has been setup on. I'm
> using the following Logon Script path in user profile:
>
> %SystemRoot%\sysvol\sysvol\TriR.Com\scripts\TriR.Bat
>
> My batch file is:
>
> @Echo Off
> REM TriR.Bat Version 1.0
> REM Exit if user has logged on to the server
> IF %ComputerName%==TriR2k801. Goto End
> REM Delete pre-existing drive mappings
> NET USE F: /DELETE >null
> NET USE H: /DELETE >null
> NET USE P: /DELETE >null
> NET USE S: /DELETE >null
> NET USE U: /DELETE >null
> REM MAP DRIVES
> NET USE F: \\TriR2k801\Finance$ >null
> NET USE H: \\TriR2k801\HR$ >null
> NET USE P: \\TriR2k801\Projects$ >null
> NET USE S: \\TriR2k801\Safety$ >null
> NET USE U: \\TriR2k801\Users$\%UserName%
> REM SYNCHRONIZE TIME WITH SERVER
> NET TIME \\TRIR2K801 /SET /YES
>
> When I log in the only drive mapped is U: But that's probably because
> I have that declared under Home Folder.
>
> On Mar 24, 11:41 am, "Richard Mueller [MVP]" <rlmueller-
>
>
>
> nos...@ameritech.nospam.net> wrote:
> > "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> >news:98a2884d-9e54-4ef9-b771-9d300046b396@c18g2000prh.googlegroups.com...
>
> > >I haven't played with Server since 2000. I'm trying to setup a
> > > machine for my neighbor and I'd like to map drives to specific shared
> > > folders. In the past I would do this in a .BAT file. If this is
> > > still the prefered practice where does the file go now. If not...what
> > > is the prefered practice, and can you point me to any documentation.
>
> > > Since time is a factor, and it is a very small outfit, if a batch file
> > > still works, I'd prefer to do that.
>
> > > Thanks for your help.
>
> > This FAQ might help if you mean to use your batch file as a logon script
> > and
> > you use Active Directory:
>
> >http://www.rlmueller.net/LogonScriptFAQ.htm
>
> > If you are using local accounts only (no AD domain), you can assign
> > logon
> > scripts to the local user accounts. The batch file syntax is unchanged
> > to
> > map drives.
>
> > --
> > Richard Mueller
> > MVP Directory Services
> > Hilltop Lab -http://www.rlmueller.net
> > --- Hide quoted text -
>
> - Show quoted text -
Author
24 Mar 2009 11:40 PM
Al Dunbar
"Dave" <Dave.Burk***@Jacobs.com> wrote in message
news:8b5fc1c4-2fc1-4196-a645-f5df41076d25@v35g2000pro.googlegroups.com...
Thanks Richard!
Still no luck.
This is a 2008 machine that Active Directory has been setup on.  I'm
using the following Logon Script path in user profile:

    %SystemRoot%\sysvol\sysvol\TriR.Com\scripts\TriR.Bat

My batch file is:

    @Echo Off
    REM TriR.Bat Version 1.0
    REM Exit if user has logged on to the server
    IF %ComputerName%==TriR2k801. Goto End

===> suggest: IF /i "%computername%" EQU "TriR2k801" goto:eof
your script had no ":end" label, whereas ":eof" automatically refers to the
end of the file

    REM Delete pre-existing drive mappings
    NET USE F: /DELETE >null

===> use >nul, as "null" would be an actual file.

/Al

    NET USE H: /DELETE >null
    NET USE P: /DELETE >null
    NET USE S: /DELETE >null
    NET USE U: /DELETE >null
    REM MAP DRIVES
    NET USE F: \\TriR2k801\Finance$ >null
    NET USE H: \\TriR2k801\HR$ >null
    NET USE P: \\TriR2k801\Projects$ >null
    NET USE S: \\TriR2k801\Safety$ >null
    NET USE U: \\TriR2k801\Users$\%UserName%
    REM SYNCHRONIZE TIME WITH SERVER
    NET TIME \\TRIR2K801 /SET /YES

When I log in the only drive mapped is U:  But that's probably because
I have that declared under Home Folder.




On Mar 24, 11:41 am, "Richard Mueller [MVP]" <rlmueller-
nos...@ameritech.nospam.net> wrote:
Show quoteHide quote
> "Dave" <Dave.Burk***@Jacobs.com> wrote in message
>
> news:98a2884d-9e54-4ef9-b771-9d300046b396@c18g2000prh.googlegroups.com...
>
> >I haven't played with Server since 2000. I'm trying to setup a
> > machine for my neighbor and I'd like to map drives to specific shared
> > folders. In the past I would do this in a .BAT file. If this is
> > still the prefered practice where does the file go now. If not...what
> > is the prefered practice, and can you point me to any documentation.
>
> > Since time is a factor, and it is a very small outfit, if a batch file
> > still works, I'd prefer to do that.
>
> > Thanks for your help.
>
> This FAQ might help if you mean to use your batch file as a logon script
> and
> you use Active Directory:
>
> http://www.rlmueller.net/LogonScriptFAQ.htm
>
> If you are using local accounts only (no AD domain), you can assign logon
> scripts to the local user accounts. The batch file syntax is unchanged to
> map drives.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab -http://www.rlmueller.net
> --

Bookmark and Share

Post Thread options