tylerseader

New Member
Joined
Oct 21, 2010
Messages
2
Context

I work for a lab at a university. We reimage 30 Windows 7 machines each semester. We use HP LP1965 widescreen monitors and Nvidia Quadro NVS 290 video cards. These monitors can rotate to profile, which is the way they are in the lab. Each machine has two monitors. We use WAIK (Windows Automated Installation Kit) to build answer files for the base image, install the image on a test machine and install all the programs we need. At that point we sysprep the machine, take the image, and deploy it to the lab computers via Windows Deployment Services
Question

Does anyone know how to programmatically rotate the display and have the rotation persist?
What We’ve Already Done

1. Looked through the registry for any orientation or display device information regarding orientation. Nothing pertinent was found. Windows 7 doesn’t have/use the GDI\Rotate key registry entry I’ve seen on some tablet pc’s
2. Used code provided by Microsoft to rotate the display using DEVMODE (http://msdn.microsoft.com/en-us/library/ms812499.aspx). The problem with it is that it does not persist.
3. Used SysInternals to monitor the processes for when I changed the rotation. I found shell32.dll seemed to be used but didn’t find any good information in the dll that could help me.
4. Used a registry monitor when I changed the display orientation (Control Panel\All Control Panel Items\Display\Screen Resolution) and tried to pinpoint the change in the registry. I couldn’t identify anything useful
5. Looked to set screen orientation in a Windows 7 answer file, but found nothing except width and height.
6. We have changed the orientation on the test machine and then sysprep’ed for OOBE and that doesn’t persist the orientation.
 

Solution
To programmatically rotate the display and ensure that the rotation persists in a Windows environment, especially when dealing with multiple monitors, there are a few methods you can explore. Given the specific scenario with Windows 7 and the setup in the university lab, here are some recommendations based on the steps you've already taken:

Solution Suggestions:​

  • Display Settings API: The solution you attempted using DEVMODE is on the right track but lacks persistence. You can explore the Display Settings API, specifically the ChangeDisplaySettingsEx() function, to modify display settings permanently. This function allows you to change display settings and persist them across reboots. Here's the...
To programmatically rotate the display and ensure that the rotation persists in a Windows environment, especially when dealing with multiple monitors, there are a few methods you can explore. Given the specific scenario with Windows 7 and the setup in the university lab, here are some recommendations based on the steps you've already taken:

Solution Suggestions:​

  • Display Settings API: The solution you attempted using DEVMODE is on the right track but lacks persistence. You can explore the Display Settings API, specifically the ChangeDisplaySettingsEx() function, to modify display settings permanently. This function allows you to change display settings and persist them across reboots. Here's the http://msdn.microsoft.com/en-us/library/dd183413(v=vs.85.aspx).
  • PowerShell Script: Create a PowerShell script that runs during system startup to set the display orientation. PowerShell provides cmdlets for managing display settings. You can leverage the Set-DisplayResolution or Set-Display cmdlets to set the display orientation. The script can be set to run either manually or as a startup script using Group Policy.
  • Third-Party Tools: Consider using third-party tools that specialize in managing display settings. Some tools offer more advanced functionality for controlling display settings and may be able to achieve the desired result more effectively.
  • Group Policy: If the monitors consistently use the same configuration, you can set the display orientation via Group Policy. Group Policy can enforce display settings across all machines in the lab, ensuring a consistent configuration.

Additional Steps:​

  • Testing: Ensure to test any solution thoroughly on a test machine before deploying it to the lab computers to avoid any unexpected behavior.
  • Documentation: Document the process and the solution implemented for future reference and ease of troubleshooting. By incorporating these methods and recommendations, you should be able to programmatically rotate the display and maintain the rotation across multiple Windows 7 machines with HP LP1965 widescreen monitors and Nvidia Quadro NVS 290 video cards.
 

Solution
Back
Top