Re: Create an Admin$ Share using the Create Win_32 class

From: mostro (mostro_at_adelphia.net)
Date: 11/24/04


Date: Wed, 24 Nov 2004 15:30:50 -0500

As simple way to achieve this is to run a logon script that deletes the
AutoShareWks value in the parameters subkey (below) from the Registry.

I use this script on my network to keep the wise guys with admin rights from
locking out the Network Adminstrators.

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/lanmanserver/parameters/AutoShareWks"

-----------------------------

http://www.jsiinc.com/SUBA/tip0000/rh0096.htm
By default, if you delete the C$, D$, etc.. Administrative shares, they will
be recreated when you reboot. To disable this feature, edit:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters

Double click on AutoShareServer and set it to 0 to disable it for a server.
Double click on AutoShareWks and set it to 0 to disable it for a
workstation.
If the entries are not present, Add Value of type REG_DWORD. The Range is 0
(disable) or 1 (enable - the default).

"Silver Fox Terrier" <SilverFoxTerrier@hotmail.com> wrote in message
news:aed16b5a.0411021952.5b623173@posting.google.com...
> Thanks for your response Ulf,
>
> the problem is that I need to be able to enable the admin$ sharename
> specifically, as I wish to then use a remote SW installation process
> that relies on this share being already available.
>
> Can anyone suggest another script/method of remotely re-enabling the
> Admin$ shares on multiple Windows NT computers using my Domain Admin
> rights? (other than using the Computer Management MMC to access each
> computer and creating the shares individually)
>
> Silver
>
>
>
> "Ulf Dornheck Busscher" <ulfdb@web.de> wrote in message
> news:<ux7AjJIwEHA.3788@TK2MSFTNGP10.phx.gbl>...
>> Silver Fox Terrier wrote:
>> > The script currently returns error 21 denoting an invalid parameter
>> >
>> > Any suggestions?
>> >
>> > errReturn = objNewShare.Create ("C:\WINDOWS", "admin$", FILE_SHARE, ,
>> "Remote Admin")
>>
>> The script is correct. The problem depends on the name "admin$". Looks
>> like
>> it's not possible to create a share with this name. Try another name an
>> anything will be fine.
>>
>> Ulf



Relevant Pages

  • Re: shared folders
    ... > They are called administrative shares and are meant for the administrators ... > admin password, so if you have a good, strong one you aren't in too much ...
    (alt.computer.security)
  • Re: shared folders
    ... > They are called administrative shares and are meant for the administrators ... > admin password, so if you have a good, strong one you aren't in too much ...
    (alt.computer.security)
  • How to remove the default shares of C$ and Admin$
    ... This is a tip on how to remove the default shares of C$ and Admin$ ... AutoShareWks is to disable automatic default shares on workstation OS'es. ... this does not remove IPC$ ...
    (microsoft.public.windowsxp.embedded)
  • Enabling the Admin$ Share using VBS and Domain Policy
    ... On some of the computers the Admin$ share no longer exists. ... sRegValueName = "AutoShareWks" ... This script has been implemented using group policies as a startup ... The script runs on windows XP but not on Windows 2000. ...
    (microsoft.public.scripting.vbscript)