Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


change the screenWidth using wmi ?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,53416
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> change the screenWidth using wmi ?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 change the screenWidth using wmi ? - 11/9/2007 8:19:52 PM   
  somebody


Posts: 4
Score: 0
Joined: 10/23/2007
From: Guangzhou,China
Status: offline
we know that we can get the system screenwidth and screenheight using wmi:

wmic desktopmonitor get ScreenWidth, ScreenHeight

what if i wanna change the system ScreenWidth and ScreenHeight ?

wmic desktopmonitor create ScreenWidth=1024 , ScreenHeight=768

the WMI class DesktopMonitor has got a menthod Create,according to its help message,we can change the value of ScreenWidth and ScreenHeight by using the Create Menthod to create a new instance:

wmic desktopmonitor create ScreenWidth=1024 , ScreenHeight=768

unfortunately,the following error occures:

Error:
code = 0x80041024
description = program can not excute the operation
device = WMI

anyone knows what seems to be the problem..?
Any help will be greatly appreciated !
 
 
Post #: 1
 
 RE: change the screenWidth using wmi ? - 12/3/2007 8:36:13 AM   
  Meg


Posts: 126
Score: 2
Joined: 7/13/2006
From: Australia
Status: offline
Microsoft say No as resolution is read only via script  http://www.microsoft.com/technet/scriptcenter/resources/qanda/jul05/hey0721.mspx


quote:


The scripting Guy

"there's no built-in way to change the screen resolution using a script."



But this looks promising http://www.entechtaiwan.com/util/multires.shtm



< Message edited by Meg -- 12/3/2007 8:41:39 AM >

(in reply to somebody)
 
 
Post #: 2
 
 RE: change the screenWidth using wmi ? - 12/3/2007 11:08:30 PM   
  TNO


Posts: 1282
Score: 12
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
I actually went over this same question a couple years ago. Visual Basic CAN do it, vbs/js cannot alone:

http://www.spoogenet.com/index.php?module=article&view=12&5cbaa9d36385e275f0a415eb9b827618=e3284fc043df32fcd035ba65d4febb6c

*The Offtopic Visual Basic code to accomplish this*


      

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to Meg)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> change the screenWidth using wmi ? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts