change screen resolution with batch file

A

Anton

I am using XP Pro, sp1 and 2000 server, sp4.

I want to run a computer startup script using Group
Policy that will set the computer's resolution to either
800x600 or 1024x768. I would also run it on user logoff.
Does anyone know how this can be accomplished? I tried
using multires utility but if the resolution is already
set to 800x600 and I run the batch file on startup it
seems to crash because the resolution is already set to
what is trying to change it to. If there were a way to do
a simple If statement in the batch file and test for the
current resolution I would be done. Does anyone know how
to run an If statement and test for the resolution in a
computer startup batch file? Thanks very much.
 
D

Drew Cooper [MSFT]

You could write a WMI script. Here's a sample that queries those values:
http://www.microsoft.com/technet/community/scriptcenter/compmgmt/scrcm101.mspx

Here's a sample that sets values (not related to screen resolution at all):
http://www.microsoft.com/technet/community/scriptcenter/compmgmt/scrcm134.mspx

Based on pieces from both of those, you should be able to put something
together.



Also - although I don't know what multires is, it probably failed on startup
because those settings are user settings and startup happens before logon.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top