?
Solved

Script to stop the C$ and ADMIN$ shares that I can run whenever I want or at startup.

Posted on 2005-03-28
4
Medium Priority
?
721 Views
Last Modified: 2008-03-10
Is there a way to write a simple script (.bat file) that I can either run when desired or add to my Startup folder, that will stop sharing the C$ and ADMIN$ shares? From what I know permanently disabling them is impossible without causing problems or interfering with other shares that I DO want to use.

Thanks,
Andrew
0
Comment
Question by:andrew82net
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
4 Comments
 
LVL 40

Expert Comment

by:Fatal_Exception
ID: 13646653
Sure...

net share C$ /delete

Put it in a batch file and away you go..

FE
0
 
LVL 40

Accepted Solution

by:
Fatal_Exception earned 2000 total points
ID: 13646699
In other words..  

=====copy start-===
net share c$ /delete
net share Admin$ /delete

Pause
=====stop=======



0
 
LVL 40

Expert Comment

by:Fatal_Exception
ID: 13646715
Also, in case you need more on Hidden Shares, here is an MS article for you:

How to create and delete hidden or administrative shares on client computers

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q314984&sd=tech
0
 
LVL 40

Expert Comment

by:Fatal_Exception
ID: 13648177
Thanks!  

FE
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A brief overview to explain gateways, default gateways and static routes OR NO - you CANNOT have two default gateways on the same server, PC or other Windows-based network device. In simple terms a gateway is formed when a computer such as a serv…
Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question