Questions

How do I use a .bat to connect to a share drive but not map the share.

+
0 Votes
Locked

How do I use a .bat to connect to a share drive but not map the share.

greavette
Hello,

I have a logon script that uses the 'net use' command to map some shared drives. One of these shares has my Thunderbird Profile on it for each user. My plan for each user is to copy the Thunderbird shortcut to their desktop (if it's not there already) so whichever PC they use in our domain, they will be able to access their email. Can I use the net use command to open the share to each person can use their email, but no map a drive letter to it?

Thank you.
  • +
    0 Votes
    JPElectron

    net use is to map a network drive, nothing else, so I'm not sure how that's going to help your situation.

    If you're asking how to make a shortcut on each users desktop, if one isn't there already, that can be added to your logon script...

    IF EXIST "%USERPROFILE%\DESKTOP\E-Mail.lnk GOTO noicon
    COPY /Y "\\server\share\E-Mail.lnk" "%ALLUSERSPROFILE%\Desktop\E-Mail.lnk"
    :noicon

    +
    0 Votes
    greavette

    Thanks very much for the reply. I figured out what I needed to do. I can still use the net use command, but I don't need to use a drive letter. It will map the drive just based on the UNC path. I can also use Pushd and Popd to quickly connect and disconnect (since I'm using Windows XP):

    Thanks for the code on checking for the shortcut and copying if it doesn't exist...very useful.

  • +
    0 Votes
    JPElectron

    net use is to map a network drive, nothing else, so I'm not sure how that's going to help your situation.

    If you're asking how to make a shortcut on each users desktop, if one isn't there already, that can be added to your logon script...

    IF EXIST "%USERPROFILE%\DESKTOP\E-Mail.lnk GOTO noicon
    COPY /Y "\\server\share\E-Mail.lnk" "%ALLUSERSPROFILE%\Desktop\E-Mail.lnk"
    :noicon

    +
    0 Votes
    greavette

    Thanks very much for the reply. I figured out what I needed to do. I can still use the net use command, but I don't need to use a drive letter. It will map the drive just based on the UNC path. I can also use Pushd and Popd to quickly connect and disconnect (since I'm using Windows XP):

    Thanks for the code on checking for the shortcut and copying if it doesn't exist...very useful.