Re: set local group policy using a script

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: george (anonymous_at_discussions.microsoft.com)
Date: 01/14/05


Date: Fri, 14 Jan 2005 23:12:18 +0100

inline...

"igor_k" <igor_k.1irtm5@mail.mcse.ms> wrote in message
news:igor_k.1irtm5@mail.mcse.ms...
>
> Martin wrote:
>> *Hi,
>>
>> Is it possible to set a Local Group policy using wsh (set policy
>> using the
>> registry is not an option) ?
>>
>> thanx in advance ..
>>
>> Martin *
>
> The only way I've found is to invoke ntrights.exe (from Win2k3
> resource kit) from the script.
> E.g. smth like:
>
> WsShell.Run('ntrights.exe /u user1 +r Se...');
>
> Other approaches did not work for me.
> secedit /import requires database name,
> and where I'm supposed to get it from?

you should know the name of the database, because you would have previously
created it yourself with the Security Analysis and Configuration MMC Snap-in
and a associated Security Template (prepared using the Security Templates
MMC Snap-in and imported into the Database) containing the security settings
(local group policy settings) that you desire.
re-reading the above I think I'll try to clarify sequence of event a bit
(just to confuse the heck out of you :-))))

-create MMC with snap-ins (Sec. Templates and Sec. Config and Anal.)
-select an appropriate Sec. template, right click, Save As with your
preferred name (so as to leave the original sec. templ. intact
-open this new template and confiure thesettings you need/want and save
template again.
-then in Sec. Config/Anal: Open Database and type a DB name (= Your DBname)
for a new DB to be created
-when asked, select the Sec. template you previously created.
This will load those settings into the DB. Save the DB.
-Now you know what the database name is and can use that file with secedit
/import

george

>
> And WMI classes for policies were pretty comlex to tackle and when I
> finally did - they did not work anyway.
>
> Good luck!
> Igor
>
>
>
> --
> igor_k
> ------------------------------------------------------------------------
> Posted via http://www.mcse.ms
> ------------------------------------------------------------------------
> View this thread: http://www.mcse.ms/message1288581.html
>



Relevant Pages

  • Re: Mail merge data base problems
    ... I opened the .dot file, located the database. ... >> I can technically do anything to the template as long ... >See if that opens without problems. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: Installer and Security
    ... you have to import the template into a security database before you ... I think SECEDIT will also import the template to a database too, ... unless you find and run the ADMINPAK.MSI file to install the extra MMCs]. ...
    (microsoft.public.win2000.security)
  • RE: Removing Blank Lines
    ... I have a setup for data clean up that you might find interesting. ... template database with a template table named tblCleanUp. ... and then import a template make-table query from ...
    (microsoft.public.access.formscoding)
  • Re: Control Word userform from Access
    ... > Word to supply custom templates of reports, letters, faxes etc for our ... As you can imagine this is a massive database. ... > create four charts, then on to a custom Word template ... >>before you called the userform and then, in the Initializeevent for the ...
    (microsoft.public.word.vba.userforms)
  • Re: Control Word userform from Access
    ... The userform is controlled by a document registration database that uses ... linked to any replys or reports to keep them all together electronically. ... The registration is controlled from Word using the normal.dot template to ...
    (microsoft.public.word.vba.userforms)