Jump to content

username667

Member
  • Posts

    5
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    New Zealand

About username667

Profile Information

  • OS
    Windows 7 x86

username667's Achievements

0

Reputation

  1. I might give that a go, thanks heaps for your time.
  2. I didn't import the card driver as I was trying to use the standard vga driver, I suspect that it doesn't support the res I want to do. Do you happen to know how much space adding standard Intel, nVidia and ATI driver support to a PE image takes up? So far I'm adding about 10mb of network and usb3 drivers, so my PE image is about 155mb. I'm PXE booting the image, so increasing the image by 20mb or more would be counterproductive to having my screen displaying at the correct resolution (I'll just keep using it at 1024x768 to keep the size down). Thanks.
  3. My apologies, I figured that the XML file would have read on OS load (PE) rather than with the wpeinit command. I have tried your suggestion, outputting an XML file and changing the x and y values according to the screen size associated with the model detection, unfortunately it has not worked. So as part of my Startnet.cmd, I call my script, which now does a 1024x786 exe command first (my default setting) then outputs the unattended example listed in this post, and if it's 1366 model then output that res, and if it's a 1280 model then output that res. Startnet moved on past my script and runs the wpeinit command but the screen res doesn't change for either of the scenarios. I have confirmed that the unattend.xml file sitting in the root of X:\ is there and I have also confirmed that it is correct (with the correct quote marks in the correct places) as per the earlier post. I have also tried running wpeinit manually once I've confirmed that the xml file is created, but still nothing. Startnet.cmd: @echo off cscript .\CustomScripts\ScreenRes\ScreenRes.vbs wpeinit wpeutil DisableFirewall cscript autoscript.vbs (Note: autoscript.vbs is what I use to carry out my PE tasks) ScreenRes.vbs Option Explicit Dim objFSO, WshShell, objFile Const wshYes = 6 Const wshNo = 7 Const wshYesNoDialog = 4 Const wshQuestionMark = 32 Const wshExclamation = 48 '++++++++++++++++++++++++++++++++++++++++++++++ 'This is where the manufacturing information is found Dim ModelNumber, Manufacturer, strComputer, objWMIService, objItem, colItems strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_BIOS",,48) For Each objItem in colItems Manufacturer = objItem.Manufacturer Next Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery( _ "SELECT * FROM Win32_ComputerSystem",,48) For Each objItem in colItems ModelNumber = objItem.Model Next '++++++++++++++++++++++++++++++++++++++++++++++ Dim AbsPath:AbsPath = Replace(WScript.ScriptFullName, WScript.ScriptName, "") 'has trailing '\' Set objFSO = CreateObject("Scripting.FileSystemObject") Set WshShell = WScript.CreateObject("WScript.Shell") Dim ModelSet1366, ModelSet1280, ModelSet1366Low, ModelSet1280Low, ModelNumberLow ModelSet1366 = "<model set here>" ModelSet1280 = "<model set here>" ModelSet1366Low = LCase(ModelSet1366) ModelSet1280Low = LCase(ModelSet1280) ModelNumberLow = LCase(ModelNumber) 'Set to 1024x768 first WshShell.Run AbsPath & "1024x768.exe", 1, True Dim Output If objFSO.FileExists ("x:\unattend.xml") Then objFSO.DeleteFile("x:\unattend.xml") End If Set Output = objFSO.CreateTextFile("x:\unattend.xml") If InStr(ModelSet1366Low, ModelNumberLow) Then 'Run 1366 Res Change Output.Write "<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" & Chr(34) & "utf-8" & Chr(34) & "?>" & vbCrLf Output.Write "<unattend xmlns=" & Chr(34) & "urn:schemas-microsoft-com:unattend" & Chr(34) & ">" & vbCrLf Output.Write "<settings pass=" & Chr(34) & "windowsPE" & Chr(34) & ">" & vbCrLf Output.Write "<component name=" & Chr(34) & "Microsoft-Windows-Setup" & Chr(34) & " processorArchitecture=" & Chr(34) & _ "x86" & Chr(34) & " publicKeyToken=" & Chr(34) & "31bf3856ad364e35" & Chr(34) & " language=" & Chr(34) & "neutral" & Chr(34) & _ " versionScope=" & Chr(34) & "nonSxS" & Chr(34) & " xmlns:wcm=" & Chr(34) & "http://schemas.microsoft.com/WMIConfig/2002/State" & Chr(34) & ">" & vbCrLf Output.Write "<Display>" & vbCrLf Output.Write "<ColorDepth>16</ColorDepth>" & vbCrLf Output.Write "<HorizontalResolution>1366</HorizontalResolution>" & vbCrLf Output.Write "<RefreshRate>60</RefreshRate>" & vbCrLf Output.Write "<VerticalResolution>768</VerticalResolution>" & vbCrLf Output.Write "</Display>" & vbCrLf Output.Write "</component>" & vbCrLf Output.Write "</settings>" & vbCrLf Output.Write "</unattend>" & vbCrLf ElseIf InStr (ModelSet1280Low, ModelNumberLow) Then 'Run 1280 Res Change Output.Write "<?xml version=" & Chr(34) & "1.0" & Chr(34) & " encoding=" & Chr(34) & "utf-8" & Chr(34) & "?>" & vbCrLf Output.Write "<unattend xmlns=" & Chr(34) & "urn:schemas-microsoft-com:unattend" & Chr(34) & ">" & vbCrLf Output.Write "<settings pass=" & Chr(34) & "windowsPE" & Chr(34) & ">" & vbCrLf Output.Write "<component name=" & Chr(34) & "Microsoft-Windows-Setup" & Chr(34) & " processorArchitecture=" & Chr(34) & _ "x86" & Chr(34) & " publicKeyToken=" & Chr(34) & "31bf3856ad364e35" & Chr(34) & " language=" & Chr(34) & "neutral" & Chr(34) & _ " versionScope=" & Chr(34) & "nonSxS" & Chr(34) & " xmlns:wcm=" & Chr(34) & "http://schemas.microsoft.com/WMIConfig/2002/State" & Chr(34) & ">" & vbCrLf Output.Write "<Display>" & vbCrLf Output.Write "<ColorDepth>16</ColorDepth>" & vbCrLf Output.Write "<HorizontalResolution>1280</HorizontalResolution>" & vbCrLf Output.Write "<RefreshRate>60</RefreshRate>" & vbCrLf Output.Write "<VerticalResolution>800</VerticalResolution>" & vbCrLf Output.Write "</Display>" & vbCrLf Output.Write "</component>" & vbCrLf Output.Write "</settings>" & vbCrLf Output.Write "</unattend>" & vbCrLf Else 'Nothing - leave at 1024x768 End If Output.Close (Note: the 1024x786.exe is a VB6 command that I programmed up using some legacy VB6 screen res module) If I use my created 1280x800.exe it does work, but my 1366x768.exe doesn't. Neither mode in this xml try has worked. Thanks for you time so far.
  4. Thank you for the suggestion arwidmark, unfortunately it doesn't solve my problem. Perhaps I should have explained a little clearer. When I boot into PE I then use DMI to look up the manufacturer and model name of the hardware, then based on the hardware name change the resolution as needed. So when my PE boots I run an EXE to set the screen res to 1024x786 which is my default, then if a model = XXXXX then change to 1280x800 elseif model = YYYYY then change to 1366x786. This works with the 1280x800 res because that appears to be supported by vga.sys, but the 1366x768 doesn't do anything (as I'm assuming the vga.sys throws an error to the process as it isn't listed as a supported res).
  5. Hi, I'm wondering if it's possible to to add the new 16:9 native res of 1366x768 to a WinPE environment without adding a display driver. For instance the standard VGA adapter supports 1280x800 (16:10) so I can use an EXE to set that res within PE, but if I try and set 1366x768 then I get no change. I can only imagine that this particular resolution isn't supported by the standard VGA adapter that WinPE uses. Does anyone know of any way to either add support to the WinPE registry, hack the vga.sys file or create a new INF file for vga.sys so that I can re-add the standard VGA driver back to the WinPE environment with native 1366x768 support? Or am I going to have to wait for Windows 7 SP1 and it's associated PE version to be released? Cheers.
×
×
  • Create New...