Re: set local group policy using a script
From: george (anonymous_at_discussions.microsoft.com)
Date: 01/14/05
- Next message: Darrell Gorter[MSFT]: "Re: deploy / change Shortcuts on a users Start bar"
- Previous message: Bill Stewart: "Re: sysprep and scheduled tasks"
- In reply to: igor_k: "Re: set local group policy using a script"
- Messages sorted by: [ date ] [ thread ]
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
>
- Next message: Darrell Gorter[MSFT]: "Re: deploy / change Shortcuts on a users Start bar"
- Previous message: Bill Stewart: "Re: sysprep and scheduled tasks"
- In reply to: igor_k: "Re: set local group policy using a script"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|