[windows2000] Re: Is there a tool to strip the comments field from W2K shares?

  • From: Jeff Malczewski <jeff.malczewski@xxxxxxxxx>
  • To: windows2000@xxxxxxxxxxxxx
  • Date: Wed, 29 Sep 2004 15:29:54 -0400

Ok, I got tired of watching this thread, so I looked up the object
property, and here it is in all it's glory.  This script will strip
the description from ALL shares on whatever machine it is run on.


strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colShares = objWMIService.ExecQuery("SELECT * FROM Win32_Share")
For each objShare in colShares
     errReturn = objShare.SetShareInfo(,"")
Next

HTH,
Jeff

On Wed, 29 Sep 2004 15:53:09 +0100, Angus Macdonald
<angus.macdonald@xxxxxxxxxxxxxxxxxxx> wrote:
> That vast majority are already hidden by including $ in the share name. That
> stops them appearing in on-screen browse lists but Win9x still sees the
> whole list and chokes.
> 
> -----Original Message-----
> From: Robert K Coffman Jr - Info From Data Corporation
> [mailto:bcoffman@xxxxxxxxxxxxxxxx]
> Sent: 29 September 2004 15:38
> To: windows2000@xxxxxxxxxxxxx
> Subject: [windows2000] Re: Is there a tool to strip the comments field
> from W2K shares?
> 
> 
> Would hiding those shares help?
> 
> - Bob Coffman
> 
> -----Original Message-----
> From: windows2000-bounce@xxxxxxxxxxxxx
> [mailto:windows2000-bounce@xxxxxxxxxxxxx]On Behalf Of Angus Macdonald
> Sent: Wednesday, September 29, 2004 10:03 AM
> To: windows2000@xxxxxxxxxxxxx
> Subject: [windows2000] Re: Is there a tool to strip the comments field
> from W2K shares?
> 
> The majority of these machines are Windows 95 and therefore don't support
> mapping drive letters to subfolders of shares and the thought of showing the
> users a common folder with 600 home directories in it and saying "yours is
> in there" doesn't appeal! Most of these people can't even remember their own
> names to login. They demand that U: points to their own home directory.
> 
> I've got Dameware on a machine here so I'll give that a go.
> 
> http://thethin.net/win2000list.cfm
> 
> 
> 
> 
> ********************************************************
> This Weeks Sponsor StressedPuppy.com Games
> Feeling stressed out? Check out our games to
> relieve your stress.
> http://www.StressedPuppy.com
> ********************************************************
> To Unsubscribe, set digest or vacation
> mode or view archives use the below link.
> 
> http://thethin.net/win2000list.cfm
> 
> Gallai'r e-bost yma gynnwys gwybodaeth gyfrinachol a/neu ddeunydd hawlfraint. 
>  Os ydych chi'n meddwl eich bod wedi derbyn yr e-bost yma drwy gamgymeriad 
> rydym yn ymddiheuro am hyn; peidiwch os gwelwch yn dda â datgelu, anfon 
> ymlaen, printio, copïo na dosbarthu gwybodaeth yn yr e-bost yma na gweithredu 
> mewn unrhyw fodd drwy ddibynnu ar ei gynnwys: gwaherddir gwneud hynny'n gyfan 
> gwbl a gallai fod yn anghyfreithlon. Rhowch wybod i'r anfonwr fod y neges yma 
> wedi mynd ar goll cyn ei dileu.
> 
> Mae unrhyw safbwynt neu farn a gyflwynir yn eiddo i'r awdur ac nid ydynt o 
> anghenraid yn cynrychioli safbwynt neu farn Ymddiriedolaeth GIG Gogledd 
> Orllewin Cymru.
> 
> Gallai cynnwys yr e-bost yma gael ei ddatgelu i'r cyhoedd o dan Gôd Bod yn 
> Agored y GIG neu Ddeddf Rhyddid Gwybodaeth 2000.  Nid oes modd gwarantu 
> cyfrinachedd y neges ac unrhyw ateb.
> 
> Bydd y neges yma ac unrhyw ffeiliau cysylltiedig wedi cael eu gwirio gan 
> feddalwedd canfod firws cyn eu trosglwyddo.  Ond rhaid i'r sawl sy'n derbyn 
> wirio rhag firws ei hun cyn agor unrhyw ymgysylltiad.  Nid yw'r 
> Ymddiriedolaeth yn derbyn unrhyw gyfrifoldeb am unrhyw golled neu niwed a 
> allai gael ei achosi gan firws meddalwedd.
> 
> This e-mail may contain confidential information and/or copyright material.  
> If you believe that you have received this e-mail in error please accept our 
> apologies; please do not disclose, forward, print, copy or distribute 
> information in this e-mail or take any action in reliance on its contents: to 
> do so is strictly prohibited and may be unlawful.  Please inform the sender 
> that this message has gone astray before deleting it.
> 
> Any views or opinions presented are to be understood as those of the author 
> and do not necessarily represent those of the North West Wales NHS Trust.
> 
> The contents of this e-mail may be subject to public disclosure under the NHS 
> Code of Openness or the Freedom of Information Act 2000.  The confidentiality 
> of the message and any reply cannot be guaranteed.
> 
> This message and any attached files will have been checked with virus 
> detection software before transmission.  However, recipients must carry out 
> their own virus checks before opening any attachment.  The Trust accepts no 
> liability for any loss or damage, which may be caused by software viruses.
> 
> ********************************************************
> This Weeks Sponsor StressedPuppy.com Games
> Feeling stressed out? Check out our games to
> relieve your stress.
> http://www.StressedPuppy.com
> ********************************************************
> To Unsubscribe, set digest or vacation
> mode or view archives use the below link.
> 
> http://thethin.net/win2000list.cfm
>
********************************************************
This Weeks Sponsor StressedPuppy.com Games
Feeling stressed out? Check out our games to
relieve your stress.
http://www.StressedPuppy.com
********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: