cantoris
asked on
Importing and applying multiple security templates - via script?
I have a number of security templates I have made to fix permissions issues with various legacy apps and I want to be able to import a (varying) selection of them via some VBScript and then apply the end result to the local machine. I have been intending to use calls to secedit.exe to do this.
For some reason in XP (perhaps only dating from a recent service pack), secedit.exe no longer includes the "/import" feature to import a security template into a database. It can only import a single one as part of the "/configure" command. There is nothing I have found on the MS site to even mention this change has occurred but if you try secedit /? on the command line, the helpfile that opens no longer shows the /import switch.
In Vista though, the /import feature has returned again.
I had been using a copy of an older version of secedit.exe that does still import but I am not overly keen on using an older system file in this way since it is probably not supported to do so. It seems therefore that I am going to have to have multiple import&apply steps using "/configure" but this seems a messy way to do it.
Does anyone have any suggestions as to whether there is a better way around this? I don't fancy trying to set ACLs directly from vbscript - I'm not that developery and security templates have such a quick and foolproof interface and are easily read by non-scripters too!
For some reason in XP (perhaps only dating from a recent service pack), secedit.exe no longer includes the "/import" feature to import a security template into a database. It can only import a single one as part of the "/configure" command. There is nothing I have found on the MS site to even mention this change has occurred but if you try secedit /? on the command line, the helpfile that opens no longer shows the /import switch.
In Vista though, the /import feature has returned again.
I had been using a copy of an older version of secedit.exe that does still import but I am not overly keen on using an older system file in this way since it is probably not supported to do so. It seems therefore that I am going to have to have multiple import&apply steps using "/configure" but this seems a messy way to do it.
Does anyone have any suggestions as to whether there is a better way around this? I don't fancy trying to set ACLs directly from vbscript - I'm not that developery and security templates have such a quick and foolproof interface and are easily read by non-scripters too!
ASKER
I need to use something native to the OS that doesn't need installing separately but I don't want to have to script loads of complex ACL adjustments indiviudally. The security template system makes them so easy to put together and adjust - for other people too.
Is there any other way of applying security templates from within a script without using secedit?
Is there any other way of applying security templates from within a script without using secedit?
xcacls.vbs is a vbs script provided by Microsoft, it doesn't need intalling. You'll just havo to "adjust" it to your needs
ASKER
I mean from the point of view of it not being a natively-present part of the OS installation. I want to be able to run whatever script solution I write on any PC without it requiring a non-standard pre-requisite such as the presence of xcacls.
Xcacls is a decent script but is not the type of solution I am looking for in this circumstance. Thanks for the suggestion though.
Xcacls is a decent script but is not the type of solution I am looking for in this circumstance. Thanks for the suggestion though.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
more info in:
http://support.microsoft.com/kb/825751