Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
scripts
hosting
jscript
remote
scripting.wsh
scriptlets
vbscript
virus.discussion
  
 
date: Fri, 4 Jan 2008 12:15:01 -0800,    group: microsoft.public.scripting.wsh        back       


Script to disable sharing on a drvie   
Hi Gurus,

Does any one has a script that can help me to unshare C drive. Right now, by 
default, my company group policy enable sharing of C drive as C$.

I can maunally change it but whenever i restart it will change back to 
sharing of C$. Hence i Need to script to run during startup to unshare it.
date: Fri, 4 Jan 2008 12:15:01 -0800   author:   How

Re: Script to disable sharing on a drvie   
"How"  wrote in message 
news:35B89241-D282-41D5-A22C-23407C75677A@microsoft.com...
> Hi Gurus,
>
> Does any one has a script that can help me to unshare C drive. Right now, 
> by
> default, my company group policy enable sharing of C drive as C$.
>
> I can maunally change it but whenever i restart it will change back to
> sharing of C$. Hence i Need to script to run during startup to unshare it.

How do you change it manually? With a registry hack? You can
apply the same hack in a batch or script file, e.g. like so:

regedit /s YourFile.reg

The trick will be to appy it ***after*** the group policy is applied,
perhaps with a little delay loop.
date: Sat, 5 Jan 2008 12:08:57 +0100   author:   Pegasus \(MVP\)

Re: Script to disable sharing on a drvie   
"Pegasus (MVP)" wrote:

> 
> "How"  wrote in message 
> news:35B89241-D282-41D5-A22C-23407C75677A@microsoft.com...
> > Hi Gurus,
> >
> > Does any one has a script that can help me to unshare C drive. Right now, 
> > by
> > default, my company group policy enable sharing of C drive as C$.
> >
> > I can maunally change it but whenever i restart it will change back to
> > sharing of C$. Hence i Need to script to run during startup to unshare it.
> 
> How do you change it manually? With a registry hack? You can
> apply the same hack in a batch or script file, e.g. like so:
> 
> regedit /s YourFile.reg
> 
> The trick will be to appy it ***after*** the group policy is applied,
> perhaps with a little delay loop. 
> 
> ===
Usually  i will just right click my c drive and choose properties and choose 
not to shared.
I have found out  a simple way. just right a simple script with the below 
command

net share c: /DELETE
>
date: Sun, 6 Jan 2008 10:18:00 -0800   author:   How

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us