Sign in to follow this  
Followers 0
HennepinCtyIT

Folder Permission

6 posts in this topic

I need to change Folder permissions on a folder and it's sub folder on 300 remote computers. These changes need to propagate to all sub folders and files of the root folder. Has any one run into this type of situation and have a script for it already?

Share this post


Link to post
Share on other sites



I need to change Folder permissions on a folder and it's sub folder on 300 remote computers. These changes need to propagate to all sub folders and files of the root folder. Has any one run into this type of situation and have a script for it already?

Download SetACL.exe and use that.

Before ptrex jumps on me, you could also download the ActiveX version SetACL.ocx and do it with COM Obj calls, it you are comfortable with that, else use the .exe for command line functionality.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You could just use Microsoft XCACLS.VBS. Benefit is you can set the permission remotely to all workstation.

It's big project if you want to convert to AutoIt, I would just use AutoIt as wrapper.

Or... just convert piece where it's writing permissions to AutoIt. :) Good luck.

Here is link. XCACLS

Edited by Joon

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

You could just use Microsoft XCACLS.VBS. Benefit is you can set the permission remotely to all workstation.

It's big project if you want to convert to AutoIt, I would just use AutoIt as wrapper.

Or... just convert piece where it's writing permissions to AutoIt. :P Good luck.

Here is link. XCACLS

That might very well work, but note it is not just a VBS script.

It downloads as an installer that installs the binaries to provide the script that comes with it the interfaces.

Those binaries come with all the usual Microsoft EULAs.

But if you have the time and money to hire a lawyer to verify your compliance with all terms and conditions therein...

Avoiding that as much as possible is one of the reasons I use AutoIt!

:)

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

That might very well work, but note it is not just a VBS script.

It downloads as an installer that installs the binaries to provide the script that comes with it the interfaces.

Those binaries come with all the usual Microsoft EULAs.

But if you have the time and money to hire a lawyer to verify your compliance with all terms and conditions therein...

Avoiding that as much as possible is one of the reasons I use AutoIt!

:)

hmm... what binaries?

It appears as it is self extractable with XCACLS.vbs in it.

My understanding was it was all done through WMI.

Maybe I'm wrong.

Edited by Joon

Share this post


Link to post
Share on other sites

hmm... what binaries?

It appears as it is self extractable with XCACLS.vbs in it.

My understanding was it was all done through WMI.

Maybe I'm wrong.

You are correct on the binaries. I'm looking through it now, and the heart of it seems to be:

'Create Locator object to connect to remote CIM object manager
    Set objLocator = CreateObject("WbemScripting.SWbemLocator")
    Set objLocalService = objLocator.ConnectServer ("", "root/cimv2")

    'Connect to the namespace which is either local or remote
    If RemoteServer_Used then
        If RemoteUserName_Used then
            Set objService = objLocator.ConnectServer (strRemoteServerName, "root/cimv2", strRemoteUserName, strRemotePassword)
        Else
            Set objService = objLocator.ConnectServer (strRemoteServerName, "root/cimv2")
        End if
    Else
        Set objService = objLocator.ConnectServer ("", "root/cimv2")
    End if

Calls to objService object seem to do most of the work after that gets run.

Be sure to have your lawyer chew on the EULA for a while...

END-USER LICENSE AGREEMENT FOR

XCACLS.VBS FOR MICROSOFT® WINDOWS SERVER 2000

IMPORTANTREAD CAREFULLY: This End-User License Agreement (EULA) is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation (Microsoft) for the Microsoft software product identified above, which includes computer software (Software). The terms and conditions of this EULA are separate and apart from those contained in any other agreement between Microsoft Corporation and you. BY INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE (AS DEFINED BELOW), YOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA. IF YOU DO NOT AGREE TO THE TERMS OF THIS EULA, DO NOT INSTALL, COPY OR USE THE SOFTWARE.

LICENSE

The Software is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. Microsoft or its suppliers owns the title, copyright and other intellectual property rights in the Software. The Software is licensed, not sold.

1. GRANT OF LICENSE. Provided you comply with all the terms and conditions of this EULA Microsoft grants you the following rights:

You may install and use the Software on an unlimited number of computers, including workstations, terminals or other digital electronic devices (Devices), which are running validly licensed copies of a Windows server operating system or Windows client operating system. Reminder: your use of the underlying Windows server or Windows client operating system software is subject to the end user license agreement that accompanies such Microsoft software. You may not modify, reproduce or distribute the Software.

2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.

Limitations on Reverse Engineering, Decompilation and Disassembly. You may not reverse engineer, decompile, or disassemble the Software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation.

Termination. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the Software and all of its component parts.

Transfer. You may not transfer the Software to another user. No Rental. You may not rent, lease, or lend the Software.

Support Services: No technical support shall be provided for the Software.

Reservation of Rights. Microsoft reserves all rights not expressly granted to you in this EULA.

3. U.S. GOVERNMENT RESTRICTED RIGHTS. The Software is provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions as set forth in subparagraph ©(1)(ii) of the Rights in Technical Data and Computer Software clause at DFARS 252.227-7013 or subparagraphs ©(1) and (2) of the Commercial Computer Software Restricted Rights at 48 CFR 52.227-19, as applicable. Manufacturer is Microsoft Corporation/One Microsoft Way/Redmond, WA 98052-6399.

4. EXPORT RESTRICTIONS. The Software is of U.S. origin. You agree to comply with all applicable international and national laws that apply to the Software, including the U.S. Export Administration Regulations, as well as end-user, end-use and destination restrictions issued by U.S. and other governments. For additional information, see <http://www.microsoft.com/exporting/>.

5. APPLICABLE LAW. If you acquired this Software in the United States, this EULA is governed by the laws of the State of Washington. If you acquired this Software in Canada, unless expressly prohibited by local law, this EULA is governed by the laws in force in the Province of Ontario, Canada; and, in respect of any dispute which may arise hereunder, you consent to the jurisdiction of the federal and provincial courts sitting in Toronto, Ontario. If this Software was acquired outside the United States, then local law may apply.

6. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE THE SOFTWARE AS IS AND WITH ALL FAULTS, AND HEREBY DISCLAIM ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) WARRANTIES, DUTIES OR CONDITIONS OF OR RELATED TO: MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, RESULTS, WORKMANLIKE EFFORT AND LACK OF NEGLIGENCE. ALSO, THERE IS NO WARRANTY, DUTY OR CONDITION OF TITLE, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT. THE ENTIRE RISK AS TO THE QUALITY, OR ARISING OUT OF THE USE OR PERFORMANCE OF THE SOFTWARE AND ANY SUPPORT SERVICES, REMAINS WITH YOU.

7. EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET ANY DUTY INCLUDING OF GOOD FAITH OR OF REASONABLE CARE, FOR NEGLIGENCE, AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF MICROSOFT, AND EVEN IF MICROSOFT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. BECAUSE SOME STATES/JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, THE ABOVE LIMITATION MAY NOT APPLY TO YOU.

8. LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED ABOVE AND ALL DIRECT OR GENERAL DAMAGES), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY FOR ALL OF THE FOREGOING SHALL BE LIMITED TO ACTUAL DAMAGES INCURRED BY YOU BASED ON REASONABLE RELIANCE UP TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE OR FIVE DOLLARS (US$5.00). THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS (INCLUDING SECTIONS 6 AND 7 ABOVE) SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE.

9. ENTIRE AGREEMENT. This EULA is the entire agreement between you and Microsoft relating to the Software and supersedes all prior or contemporaneous oral or written communications, proposals and representations with respect to the Software or any other subject matter covered by this EULA. If any provision of this EULA is held to be void, invalid, unenforceable or illegal, the other provisions shall continue in full force and effect.

10. Si vous avez acquis votre produit Microsoft au CANADA, la garantie limitée suivante sapplique :

DÉNI DE GARANTIES. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, LE LOGICIEL ET LES SERVICES DE SOUTIEN TECHNIQUE (LE CAS ÉCHÉANT) SONT FOURNIS TELS QUELS ET AVEC TOUS LES DÉFAUTS PAR MICROSOFT ET SES FOURNISSEURS, LESQUELS PAR LES PRÉSENTES DÉNIENT TOUTES AUTRES GARANTIES ET CONDITIONS EXPRESSES, IMPLICITES OU EN VERTU DE LA LOI, NOTAMMENT, MAIS SANS LIMITATION, (LE CAS ÉCHÉANT) LES GARANTIES, DEVOIRS OU CONDITIONS IMPLICITES DE QUALITÉ MARCHANDE, DADAPTATION À UNE FIN PARTICULIÈRE, DE FIABILITÉ OU DE DISPONIBILITÉ, DEXACTITUDE OU DEXHAUSTIVITÉ DES RÉPONSES, DES RÉSULTATS, DES EFFORTS DÉPLOYÉS SELON LES RÈGLES DE LART, DABSENCE DE VIRUS ET DABSENCE DE NÉGLIGENCE, LE TOUT À LÉGARD DU LOGICIEL ET DE LA PRESTATION OU DE LOMISSION DE LA PRESTATION DES SERVICES DE SOUTIEN TECHNIQUE OU À LÉGARD DE LA FOURNITURE OU DE LOMISSION DE LA FOURNITURE DE TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI SY RAPPORTE GRÂCE AU LOGICIEL OU PROVENANT AUTREMENT DE LUTILISATION DU LOGICIEL . PAR AILLEURS, IL NY A AUCUNE GARANTIE OU CONDITION QUANT AU TITRE DE PROPRIÉTÉ, À LA JOUISSANCE OU LA POSSESSION PAISIBLE, À LA CONCORDANCE À UNE DESCRIPTION NI QUANT À UNE ABSENCE DE CONTREFAÇON CONCERNANT LE LOGICIEL.

EXCLUSION DES DOMMAGES ACCESSOIRES, INDIRECTS ET DE CERTAINS AUTRES DOMMAGES. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, EN AUCUN CAS MICROSOFT OU SES FOURNISSEURS NE SERONT RESPONSABLES DES DOMMAGES SPÉCIAUX, CONSÉCUTIFS, ACCESSOIRES OU INDIRECTS DE QUELQUE NATURE QUE CE SOIT (NOTAMMENT, LES DOMMAGES À LÉGARD DU MANQUE À GAGNER OU DE LA DIVULGATION DE RENSEIGNEMENTS CONFIDENTIELS OU AUTRES, DE LA PERTE DEXPLOITATION, DE BLESSURES CORPORELLES, DE LA VIOLATION DE LA VIE PRIVÉE, DE LOMISSION DE REMPLIR TOUT DEVOIR, Y COMPRIS DAGIR DE BONNE FOI OU DEXERCER UN SOIN RAISONNABLE, DE LA NÉGLIGENCE ET DE TOUTE AUTRE PERTE PÉCUNIAIRE OU AUTRE PERTE DE QUELQUE NATURE QUE CE SOIT) SE RAPPORTANT DE QUELQUE MANIÈRE QUE CE SOIT À LUTILISATION DU LOGICIEL OU À LINCAPACITÉ DE SEN SERVIR, À LA PRESTATION OU À LOMISSION DE LA PRESTATION DE SERVICES DE SOUTIEN TECHNIQUE OU À LA FOURNITURE OU À LOMISSION DE LA FOURNITURE DE TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI SY RAPPORTE GRÂCE AU LOGICIEL OU PROVENANT AUTREMENT DE LUTILISATION DU LOGICIEL OU AUTREMENT AUX TERMES DE TOUTE DISPOSITION DE LA PRÉSENTE CONVENTION OU RELATIVEMENT À UNE TELLE DISPOSITION, MÊME EN CAS DE FAUTE, DE DÉLIT CIVIL (Y COMPRIS LA NÉGLIGENCE), DE RESPONSABILITÉ STRICTE, DE VIOLATION DE CONTRAT OU DE VIOLATION DE GARANTIE DE MICROSOFT OU DE TOUT FOURNISSEUR ET MÊME SI MICROSOFT OU TOUT FOURNISSEUR A ÉTÉ AVISÉ DE LA POSSIBILITÉ DE TELS DOMMAGES.

LIMITATION DE RESPONSABILITÉ ET RECOURS. MALGRÉ LES DOMMAGES QUE VOUS PUISSIEZ SUBIR POUR QUELQUE MOTIF QUE CE SOIT (NOTAMMENT, MAIS SANS LIMITATION, TOUS LES DOMMAGES SUSMENTIONNÉS ET TOUS LES DOMMAGES DIRECTS OU GÉNÉRAUX OU AUTRES), LA SEULE RESPONSABILITÉ DE MICROSOFT ET DE LUN OU LAUTRE DE SES FOURNISSEURS AUX TERMES DE TOUTE DISPOSITION DE LA PRÉSENTE CONVENTION ET VOTRE RECOURS EXCLUSIF À LÉGARD DE TOUT CE QUI PRÉCÈDE SE LIMITE AU PLUS ÉLEVÉ ENTRE LES MONTANTS SUIVANTS : LE MONTANT QUE VOUS AVEZ RÉELLEMENT PAYÉ POUR LE LOGICIEL OU 5,00 $US. LES LIMITES, EXCLUSIONS ET DÉNIS QUI PRÉCÈDENT (Y COMPRIS LES CLAUSES CI-DESSUS), SAPPLIQUENT DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, MÊME SI TOUT RECOURS NATTEINT PAS SON BUT ESSENTIEL.

À moins que cela ne soit prohibé par le droit local applicable, la présente Convention est régie par les lois de la province dOntario, Canada. Vous consentez à la compétence des tribunaux fédéraux et provinciaux siégeant à Toronto, dans la province dOntario.

Au cas où vous auriez des questions concernant cette licence ou que vous désiriez vous mettre en rapport avec Microsoft pour quelque raison que ce soit, veuillez utiliser linformation contenue dans le Logiciel pour contacter la filiale de Microsoft desservant votre pays, ou visitez Microsoft sur le World Wide Web à <http://www.microsoft.com>.

Sheesh... :)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0