Solved

Reset screen resolution on login

Posted on 2004-04-25
11
2,691 Views
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!

Cheers,

Paul.
0
Comment
Question by:H4Inf
  • 6
  • 4
11 Comments
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
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.
Where?

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.
 Notes

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.
:
\\Server\ShareName\UserName

For ShareName, create a Profiles folder if it does not already exist, and share the folder with authenticated users allowing read-only permissions
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?
0
 

Author Comment

by:H4Inf
Comment Utility
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.

Paul.
0
 
LVL 49

Expert Comment

by:sunray_2003
Comment Utility
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
0
 
LVL 67

Expert Comment

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

Expert Comment

by:sirbounty
Comment Utility
>>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
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:H4Inf
Comment Utility
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.

Paul.
0
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
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
    Wscript.Echo
Next
---------------
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)
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 500 total points
Comment Utility
MultiRes may be another option for you: http://www.entechtaiwan.com/util/multires.shtm
0
 

Author Comment

by:H4Inf
Comment Utility
MultiRes sounds good. I will look into it. =)
0
 

Author Comment

by:H4Inf
Comment Utility
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

' STUDENT CENTRE
'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

'TECH ROOM
'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!!

Paul.
0
 
LVL 67

Expert Comment

by:sirbounty
Comment Utility
Glad you got it sorted...Thanx
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now