Reset screen resolution on login

I work at a school with pc's running win2000 and xp and even though I have disabled access to the display control panel, some students have written their own programs to change the res. I don't mind them changing the res, but when it doesnt change back when the next person logs in, this is an issue.

How can I setup windows to default to a specific res... OR

Do I need some sort of mini-program that runs on startup and resets the res.

Most importantly though, I want the res to be set differently depending on the computers name. Currently I do other functions based around the computers name using vbs scripts.

Ideas would be great!


Who is Participating?
MultiRes may be another option for you:
To create a mandatory user profile
Open Active Directory Users and Computers.
In the details section, right-click the applicable user account, and then click Properties.

Active Directory Users and Computers
applicable domain
applicable container (such as Users)
applicable user account
Click the Profile tab.
In Profile path, type the path information ending with the .man file name extension.

To perform this procedure, you must be a member of the Account Operators group, Domain Admins group, or the Enterprise Admins group in Active Directory, or you must have been delegated delegated
An assignment of administrative responsibility to a user, computer, group, or organization.
For Active Directory, an assignment of responsibility that allows users without administrative credentials to complete specific administrative tasks or to manage specific directory objects. Responsibility is assigned through membership in a security group, the Delegation of Control Wizard, or Group Policy settings.

For DNS, an assignment of responsibility for a DNS zone. Delegation occurs when a name server (NS) resource record in a parent zone lists the DNS server that is authoritative for a child zone.
the appropriate authority. As a security best practice, consider using Run as to perform this procedure.
To open Active Directory Users and Computers, click Start, click Control Panel, click Performance and Maintenance, click Administrative Tools, and then double-click Active Directory Users and Computers.
A mandatory user profile mandatory user profile
A user profile that is not updated when the user logs off. It is downloaded to the user's desktop each time the user logs on, and it is created by an administrator and assigned to one or more users to create consistent or job-specific user profiles. Only members of the Administrators group can change a preconfigured user profile. The user can still modify the desktop, but the changes are not saved when the user logs off. The next time the user logs on, the mandatory user profile is downloaded again. User profiles become mandatory when you rename the NTuser.dat file on the server to This extension makes the user profile read-only.
Mandatory user profiles do not allow changes to be applied to the user profile stored on the server.
Profile management should be done preferentially by policy. Mandatory profile use, although permitted, is less manageable and more prone to create administration problems, thus it is not recommended.
Use a full path in each user account user account
In Active Directory, an object that consists of all the information that defines a domain user, which includes user name, password, and groups in which the user account has membership. User accounts can be stored in either Active Directory or on your local computer.
For computers running Windows XP Professional and member servers running Windows Server 2003, use Local Users and Groups to manage local user accounts. For domain controllers running Windows Server 2003, use Active Directory Users and Computers to manage domain user accounts.

For ShareName, create a Profiles folder if it does not already exist, and share the folder with authenticated users allowing read-only permissions
A rule associated with an object to regulate which users can gain access to the object and in what manner. Permissions are assigned or denied by the object's owner.. The shared folder shared folder
A folder on another computer that has been made available for other people to use on the network.must be created before the user profile can be used.

To provide better security, user profiles and home folders should be created on an NTFS volume.
When creating a mandatory profile, make sure you set the appropriate access permissions for the user or groups of users who will use this profile.
You can also create a mandatory user profile by using Windows Explorer to rename the NTuser.dat file to
The administrator can assign the same mandatory user profile to as many users as needed.

Will Mandatory profiles work for you?
H4InfAuthor Commented:
This has nothing to do with my question. We are operating mandatory profiles already. The screen resolutions seem to be stored on the local machines.

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Check this vb code

not sure if this can help you to reset the resolution of your wish running the script at startup
>>We are operating mandatory profiles already<<
And still the resolution is not reset?  Doesn't sound like it was configured properly....??
>>A mandatory user profile is a user account in which the settings are preconfigured by the administrator. If you are using a mandatory user profile, you can modify the profile, but when you log off the computer, the changes are not saved to the profile location (the changes are non-persistent). When you log on to the computer again, the original mandatory profile is loaded on the computer.<<

You need to make the changes with the administrator account...
Step 1: Create a Profile
Step 2: Copy the Profile to a Shared Folder
Step 3: Assign the Mandatory User Profile
ref: for more details

This should accomplish what you're asking, if I'm not mistaken...

Also see:
H4InfAuthor Commented:
SirBounty, the profile does not cater for my requirements. We are not having trouble with our mandatory profile.

Sunray_2003 was on the right track, but I was after vbs script, rather than vb code.

Surely there is a liitle program out there to change the resolution, or better yet, some vbscript that would do it.

Found a WMI script that can read the resolution - perhaps someone can adjust this to write a resolution back and apply this in a logon script...(though I honestly think this can be done with mandatory profiles).
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_DisplayControllerConfiguration")
For Each objItem in colItems
    Wscript.Echo "Bits Per Pixel: " & objItem.BitsPerPixel
    Wscript.Echo "Color Planes: " & objItem.ColorPlanes
    Wscript.Echo "Device Entries in a ColorTable: " & objItem.DeviceEntriesInAColorTable
    Wscript.Echo "Device Specific Pens: " & objItem.DeviceSpecificPens
    Wscript.Echo "Horizontal Resolution: " & objItem.HorizontalResolution
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Refresh Rate: " & objItem.RefreshRate
    Wscript.Echo "Setting ID: " & objItem.SettingID
    Wscript.Echo "Vertical Resolution: " & objItem.VerticalResolution
    Wscript.Echo "Video Mode: " & objItem.VideoMode

Otherwise, perhaps you might find this useful: (VidRes - you can script it via a batch file)
H4InfAuthor Commented:
MultiRes sounds good. I will look into it. =)
H4InfAuthor Commented:
Working with MultiRes. I put the multires executable into the mandatory profile then have this script executed on startup:

' VBScript.
Dim shell
Set shell = CreateObject("WScript.Shell")
Dim net
Set net = CreateObject("WScript.Network")
user = net.username

'if client computer name is SC*
if Instr(net.ComputerName, "SC") > 0 Then
shell.Run """c:\Documents and Settings\" & user & "\MULTIRES\MultiRes.exe"" /1024,768,-1"
end if

' M8
'if client computer name is M8*
if Instr(net.ComputerName, "M8") > 0 Then
shell.Run """c:\Documents and Settings\" & user & "\MULTIRES\MultiRes.exe"" /1024,768,-1"
end if

' M6
'if client computer name is M6*
if Instr(net.ComputerName, "M6") > 0 Then
shell.Run """c:\Documents and Settings\" & user & "\MULTIRES\MultiRes.exe"" /1024,768,-1"
end if

'if client computer name is dt*
if Instr(net.ComputerName, "DT") > 0 Then
shell.Run """c:\Documents and Settings\" & user & "\MULTIRES\MultiRes.exe"" /1024,768,-1"
end if

'LAB2 / SM9 WS
'if client computer name is ws*
if Instr(net.ComputerName, "WS") > 0 Then
shell.Run """c:\Documents and Settings\" & user & "\MULTIRES\MultiRes.exe"" /800,600,-1"
end if

Thanks for all your help!!

Glad you got it sorted...Thanx
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.