Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Reset screen resolution on login

Posted on 2004-04-25
Medium Priority
Last Modified: 2007-12-19
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!


Question by:H4Inf
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
LVL 67

Expert Comment

ID: 10915195
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 profiles.is 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 NTuser.man. 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 NTuser.man.
The administrator can assign the same mandatory user profile to as many users as needed.
ref: http://www.microsoft.com/resources/documentation/WindowsServ/2003/standard/proddocs/en-us/sag_UP_Create_Mandatory_Profile.asp

Will Mandatory profiles work for you?

Author Comment

ID: 10915201
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.

LVL 49

Expert Comment

ID: 10915209
Check this vb code http://www.freevbcode.com/ShowCode.Asp?ID=467

not sure if this can help you to reset the resolution of your wish running the script at startup
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

LVL 67

Expert Comment

ID: 10915211
>>We are operating mandatory profiles already<<
And still the resolution is not reset?  Doesn't sound like it was configured properly....??
LVL 67

Expert Comment

ID: 10915228
>>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: http://support.microsoft.com/?kbid=323368 for more details

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

Also see: http://scilnet.fortlewis.edu/tech/Users/man_nt_profile.htm

Author Comment

ID: 10915249
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.

LVL 67

Expert Comment

ID: 10915335
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
ref: http://www.microsoft.com/technet/community/scriptcenter/compmgmt/scrcm101.mspx

Otherwise, perhaps you might find this useful: http://www.jddesign.co.uk/ (VidRes - you can script it via a batch file)
LVL 67

Accepted Solution

sirbounty earned 2000 total points
ID: 10915367
MultiRes may be another option for you: http://www.entechtaiwan.com/util/multires.shtm

Author Comment

ID: 10915395
MultiRes sounds good. I will look into it. =)

Author Comment

ID: 10915538
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!!

LVL 67

Expert Comment

ID: 10917652
Glad you got it sorted...Thanx

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question