group-policy

Is there a way to disable formatting of a USB Flashdrive?

Can any script or setting be written (autorun file?) to disable formatting of a USB Flashdrive? (Win XP, via Windows Explorer > Format) I'm aware of write-protection, but I don't want to completely prevent modifying files, instead something like what a Group Policy setting could do? Edit: Really what I'm asking for is a registry setti...

Reading Local Group Policy / Active Directory Settings

I'm writing a C# program that will enforce password complexity in accordance with the Windows Group Policy setting "Password must meet complexity requirements". Specifically, if that policy is set to Enabled either on the local machine (if it's not part of a domain) or by the Domain Security Policy (for domain members), then my software...

Which has the greater precedence: Windows Group Policy or Registry Keys

Hi, Say there is a group policy that prevents the user from using the "run" command in Windows. What would happen if there was a registry key that contradicted this i.e. allowed the user to use the run command? Would the user be able to use "run" or not? Thanks a lot for any answer! ...

How To: Create a Group Policy Extension (Windows XP/Vista/7)

Hello. I would like to write a Group Policy Extension for my application. The config is rather complex (hierarchical) and so doing it via ADMX is not a likely option. The problem is I cannot find any sample code to help me even get started. The MSDN help (http://msdn.microsoft.com/en-us/library/aa374176%28VS.85%29.aspx) offers little in...

Locking down a TS account with Group Policy - Removing the Network folder from File->Open

I'm trying to create a locked down TS account for Windows Server 2008. The account runs a legacy program that is not exactly friendly or configurable. In this program, the end user can go to file -> open, and then he sees the Desktop link and worse, the Network link. He can then browse the directory structure of our entire network. I can...

Can't read from RSOP_RegistryPolicySetting WMI class in root\RSOP namespace

The class is documented in http://msdn.microsoft.com/en-us/library/aa375050%28VS.85%29.aspx And from this page it seems it's not an abstract class: http://msdn.microsoft.com/en-us/library/aa375084%28VS.85%29.aspx But whenever I run the code below I get an "Invalid Class" exception in ManagementObjectSearcher.Get(). So, does this clas...

Is there any way to read password policies via the WMI RSOP_XXX classes?

Those all reside in the root\RSOP\Computer namespace. The only class from which I got non-empty results is RSOP_RegistryPolicySetting, and that one only gave me settings for Windows Update and System Restore configuration. I do know there are password policies in our network (age, length etc), but queries on the following classes only g...

How can I create a Visual Studio Setup Project MSI that can be installed unattended via AD Group Policy?

if i want to install a MSI, created by Visual Studio 2005, via Active Directory Group Policy: What requirements must be met by the Setup Project? How can I specify the installation path? Is this a part of the Group Policy setting? Or do I have to create a special "silent install" version of the MSI? Thanks! ...

C# How do I disable interactive login for a local user account. Similar to Network Service account

I've created a special user account for my applications use, and I need to know how to disable the interactive login feature so that it's only available as a system account. Right now any machine I deploy this application on, the user shows up in the login menu. Any help is appreciated. Is it a setting on the account or a GPO? ...

Log files for group policy application deployment

I'm looking into using group policy to deploy a couple of applications. I want to have the log of each installation written to a shared folder on a file server for tracking purposes. I can create the log if I pass the appropriate parameters. For example: msiexec /i Package.msi /l*vx c:\Package.log However using group policy for the dep...

IGroupPolicyObject - Do I really need it to change Auto Update settings?

Our .NET application needs to tweak various settings such as Microsoft Auto Updates. Example here would be "Install Updates automatically" or "Disable Automatic updates". I know these settings can be found and modified in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update My understan...

How do I change the owner/group of a file in my server?

I am getting a 500 error because the owner of some of my files is set incorrectly, its set at 0 0 when the rest are at 510 510?? How do I fix this, I've read something about ssh? ...

How do I set a Group Policy's Password Policy in C#

I am trying to retrieve a group policy from a Windows Server 2008 Active Directory and change the minimum password age, maximum password age, and minimum password length in a C# application. Is there a way to do this? So far I have only found out how to create new Group Policy objects using Interop.GPMGMTLib (gpmgmt.dll), yet I haven...

Make C# application Group Policy aware

I want to make my app GPO aware. I know that it's basically just reading from a specific registry path but I still have some questions: How do I detect GPO refreshes? There's RegisterGPNotification here: http://msdn.microsoft.com/en-us/library/aa374404(VS.85).aspx but is there anything ready baked for C# out there or at Microsoft? What...

How could you edit a specific group policy using a batch file.

Im working on over 700 computers in a school district and have written a small program that i intend to write to a cd. The program is set to autorun when the disk is inserted and prompt the screen resolution of the computer and what computer the building is in (the different school buildings). Afterwards the program will run a batch file...

Windows 7 screensaver policy issues

I have a GPO that sets blank screensaver and locks computer after 10 minutes of being idle. I have one user in the GPO that has a computer that will not go to screensaver after 10 minutes. What could I do to errorhandle this problem, like I said he is the ONLY user that this happens to and he IS part of the admins that are within the GP...

Adding a logoff script

I have some scripts that I would like to run every time a user logs off. I would like to create something that programatically sets up the logoff scripts. For example, an exe or a cmd file that can be executed to add the logoff script to the list of logoff scripts that Windows executes. Because of this, a Windows API function or a Window...