Wyse Device Manager(WDM) – Push Screen Resolution Setting – XPe/WES

Requirements

  1. windows screen resolution changing program that does it via command line arguments
  2. pskill.exe
  3. My VBscript code to make the logic handling easy
  4. Finally wrapping everything with a Wyse rapport script

VBScript Code


'==========================================================================
' NAME: ChangeScreenRes.vbs
'
' AUTHOR: Smulpuru ,
' DATE : 7/5/2012
'
' COMMENT:
'
'==========================================================================
Dim objFSO, objFile, strFilename, blnExists, Command1, Command2, width, heigth, WshShell, strRegvalue, strValue
strFilename = "C:\Windows\System32\multires.exe"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set args = WScript.Arguments
width = args.Item(0)
heigth = args.Item(1)
Command1 = strFilename + " /" + width + "," + heigth
Command2 = "c:\windows\system32\pskill.exe -t multires.exe"
strRegvalue = "HKEY_CURRENT_USER\Software\Sysinternals\PsKill\EulaAccepted"
strValue = 1
WshShell.RegWrite strRegvalue, strValue,"REG_DWORD"
'blnExists will be True or False
blnExists = objFSO.FileExists(strFilename)
If blnExists Then
WshShell.Run Command1
WScript.Sleep 5000
WshShell.Run Command2
Else
'
End If
Set WshShell = Nothing
Set objFSO = Nothing

Copy Files to WDM File Repository

pskill.exe; multires.exe and ChangeScreenRes.vbs to ftp://[WDM-Server]/Rapport/Video

Rapport Script

[Version]
Number=ChangeScreenRes1920x1200
Description=ChangeScreenRes1920x1200
OS=XP
Category=Device Configuration
USE_REMOTE=Yes
; Date: 5/10/2012
[Script]
SF "Video\multires.exe" "c:\windows\system32\multires.exe"
DF "c:\ssmc\ChangeScreenRes.vbs"
SF "Video\ChangeScreenRes.vbs" "c:\ssmc\ChangeScreenRes.vbs"
SF "Video\pskill.exe" "c:\windows\system32\pskill.exe"
EX "c:\windows\system32\cscript.exe c:\ssmc\ChangeScreenRes.vbs 1920 1200" "+10"

Download Rapport Pkg and VBScript

WDM-ScreenResChangePkg.zip

Notes

For WES change the OS value to WES(7) in the rapport Script.
For different resolution settings change the arguments that are passed to ChangeScreenRes.vbs in the rapport script.

Leave a comment

Your email address will not be published. Required fields are marked *

WordPress Appliance - Powered by TurnKey Linux