Discussion Locked

Create share with login script?

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I'm curious if i can use a login script to share the drives on all of my network's computers. Doing it by hand would be tedious and not as cool. Some of the computers have only one partition and others have 2 or more. I need to create the hidden administrative shares (c$ or d$, for example) on all of the 98SE computers that dont have them by default. Thanks in advance.

9 replies

by timthetoolman

Hi,

Maintain a list of all the machines in your network that you're interested in, in the file MyNetworkMachines.txt for example.

Then something like the following would do it.

FOR %server IN (MyNetworkMachines.txt) DO net use \\%server\c$
Would map all the c$ shares.
You could be trickier than this and expand the MyNetworkMachines.txt to contain the share names for each machine as well. Then alter the "FOR" statement to use them specifically.

Go to a command prompt and type "help for" to get the rundown on what you can do with "for". Its quite powerful.

Cheers,
Tim.

by ja_seaton

Gavin's answer led me in the right direction. In system policy editor (im running nt 4.0 SB), the option i was looking for was in the default computer policy. "Windows NT Network" - "Sharing" - "Create hidden drive shares (workstation)". I saved it to the netlogon folder on my PDC. No luck, however, with 98 machines. Im still open to using a login script if this can be done. Any suggestions?

by ja_seaton

Hmmm... I dont want to leave the question open for too long. I've already gone created the shares by hand at this point. It would've been nice to save the hours that it took to do that, though. Thanks for your help everyone.

This discussion is closed to new replies.