Page 1 of 1 1
Topic Options
#89935 - 2002-11-28 10:53 AM HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
There's a UDF to get the screenres:
http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=12;t=000035

Q:
How to set it with WMI???
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89936 - 2002-11-28 11:29 AM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I may just need to overwrite that.
real screen res code:
code:
For each $Item in GetObject("winmgmts:\\" + $strComputer + "\root\cimv2").ExecQuery("Select * from Win32_DesktopMonitor",,48)
"ScreenHeight: " + $item.ScreenHeight ?
"ScreenWidth: " + $item.ScreenWidth ?
Next

just wrote that, not yet on the setting though as have that link thing going on there...
_________________________
!

download KiXnet

Top
#89937 - 2002-11-28 11:43 AM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
OK,

but this is GET, I want to SET...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89938 - 2002-11-29 12:27 AM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it just seems impossible with wmi, sorry.

couldn't find anything for vbscript or wsh either... am I blind?
_________________________
!

download KiXnet

Top
#89939 - 2002-11-29 12:58 AM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Found a freeware util which can do it from the commandline...
SetRes --> http://www.iansharpe.com/
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89940 - 2002-11-28 01:02 PM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
actually, it should be ok to do with WMI but as that shit is not documented.¨
trying with technet enum codes and some from kixomatic and I can't get the methods exposed [Mad]

[Mad] [Mad] [Mad] [Mad] [Mad] [Mad] [Mad]
_________________________
!

download KiXnet

Top
#89941 - 2002-11-28 01:42 PM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Found there is an api call which can do the trick:

STFW for user32.dll and changedisplaysettingsa

Problem is how to script an api call...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89942 - 2002-11-28 01:43 PM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
easy, where is the reference?
_________________________
!

download KiXnet

Top
#89943 - 2002-11-28 01:46 PM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/gdi/devcons_7gz7.asp
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89944 - 2002-11-28 02:18 PM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
that is bad...
it wants pointers to structures as input...
_________________________
!

download KiXnet

Top
#89945 - 2002-11-28 05:00 PM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
does it need to be on the fly?

I changed some things in reg and restarted system and voila, this is not easy to read anymore.
nice.
_________________________
!

download KiXnet

Top
#89946 - 2002-11-29 12:18 AM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
No need for underfly

but your reg, does it have HKLM??

If so the problem for non-admins I guess...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89947 - 2002-11-29 07:28 AM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
well, can normal user change the screen anyway?
_________________________
!

download KiXnet

Top
#89948 - 2002-11-29 07:44 AM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
With SetRes they can...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89949 - 2002-11-30 12:23 AM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
no way.
even the api's I've checked does not have personality override.
nor any file that affects this.
_________________________
!

download KiXnet

Top
#89950 - 2002-11-29 01:57 PM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Must explain,

Control Panel isn't disabled in policy, only hidden.... Therefore I think they (normal users) are able to set the resolution...
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
#89951 - 2002-11-29 02:46 PM Re: HowTo SetScreenRes()
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
it does not matter what control panel has.
doesn't simply using those functions crack down to registry write?

have you tried with normal user account?
_________________________
!

download KiXnet

Top
#89952 - 2002-11-29 03:12 PM Re: HowTo SetScreenRes()
MightyR1 Offline
MM club member
*****

Registered: 1999-09-09
Posts: 1264
Loc: The Netherlands
Yes and successfull [Wink]
_________________________
Greetz,
Patrick Rutten

- We'll either find a way or make one...
- Knowledge is power; knowing how to find it is more powerful...
- Problems don't exist; they are challenges...

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 895 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.07 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org