PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.win.server.scripting > How to configure NTFS permissions on a shared folder
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to configure NTFS permissions on a shared folder

Réponse
 
LinkBack Outils de la discussion
Vieux 09/10/2007, 00h31   #1
HRS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to configure NTFS permissions on a shared folder

Hello everyone,
I am hoping someone can us add a feature to a VBscript we are currently
using. We have a VBscript that checks for new Terminal Services profiles and
if any new ones are found it copies a folder called MPS from C:\ to
M:\metaframe\profiles\%username%\Application Data. We need to modify the
script to also add the domain\domainusers group with MODIFY rights to the
NTFS permissions of the new M:\metaframe\profiles\%username%\Application
Data\MPS folder.
Any would be greatly appreciated.
Copy of current script:

Dim fso
Dim fol
Dim fc
Dim f
dim fol_ad
Dim shellString
Dim homeFolderPath
Dim folderName
Dim objFile
dim fileName
dim append

append = 8 '--variable for OpenTextFile method
fileName = "c:\mps script\MPSscript log.txt" '--change this to the log file
path and name desired
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFile = fso.OpenTextFile(fileName, append,true)
set fol = fso.GetFolder("M:\metaframe\profiles") 'change as required
set fc = fol.SubFolders

For Each f In fc
If (f.DateCreated > Now -1) Then
folderName = f.path & "\Application Data\"
fso.CopyFolder "c:\mps",folderName,true
objFile.writeLine now & ": " & f.path
End If
Next
  Réponse avec citation
Vieux 10/10/2007, 03h31   #2
pooradmin
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to configure NTFS permissions on a shared folder

On Oct 8, 6:31 pm, HRS <H...@discussions.microsoft.com> wrote:
> Hello everyone,
> I am hoping someone can us add a feature to a VBscript we are currently
> using. We have a VBscript that checks for new Terminal Services profiles and
> if any new ones are found it copies a folder called MPS from C:\ to
> M:\metaframe\profiles\%username%\Application Data. We need to modify the
> script to also add the domain\domainusers group with MODIFY rights to the
> NTFS permissions of the new M:\metaframe\profiles\%username%\Application
> Data\MPS folder.
> Any would be greatly appreciated.
> Copy of current script:
>
> Dim fso
> Dim fol
> Dim fc
> Dim f
> dim fol_ad
> Dim shellString
> Dim homeFolderPath
> Dim folderName
> Dim objFile
> dim fileName
> dim append
>
> append = 8 '--variable for OpenTextFile method
> fileName = "c:\mps script\MPSscript log.txt" '--change this to the log file
> path and name desired
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set objFile = fso.OpenTextFile(fileName, append,true)
> set fol = fso.GetFolder("M:\metaframe\profiles") 'change as required
> set fc = fol.SubFolders
>
> For Each f In fc
> If (f.DateCreated > Now -1) Then
> folderName = f.path & "\Application Data\"
> fso.CopyFolder "c:\mps",folderName,true
> objFile.writeLine now & ": " & f.path
> End If
> Next


You can create a Wscript.Shell object to call xcacls.exe

-J
www.pooradmin.com

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h06.


Édité par : vBulletin® version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08915 seconds with 10 queries