none
DragonBoard 410c in Portrait Mode RRS feed

  • Question

  • I have the latest Windows IoT Core build running on a DragonBoard 410c.  
    I would like to have the system run in portrait mode, avoiding to use Iot Core Dashboard.  
    How would I go about setting this in IoT and/or the DragonBoard 410c?

    Thanks,
    emanuele leoni

    Monday, October 14, 2019 11:15 AM

Answers

  • Hello emanuele,

    Yes, that would be the route I would go. Just put the call outside the registry checks of oemcustomization.cmd so it is run every time.

    It would also be possible to setup your UWP app to be able to change the orientation if you have the .exe available. See for example this registry key that is set in my oemcustomization.cmd.

    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher" /f /v AllowedExecutableFilesList /t REG_MULTI_SZ /d "c:\windows\system32\cmd.exe\0c:\windows\system32\ApplyUpdate.exe\0C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe\0C:\Windows\System32\shutdown.exe\0C:\Windows\System32\powercfg.exe\0C:\Windows\System32\setrtc.exe\0C:\Windows\System32\setdisplayresolution.exe\0"

    Which you would use like

    await ProcessLauncher.RunToCompletionAsync(@"C:\Windows\System32\setdisplayresolution.exe", "-orientation:90");

    And, of course, this requires

        <iot:Capability Name="systemManagement" />

    in your Package.appxmanifest.

    Thursday, October 17, 2019 1:18 PM

All replies

  • Not sure if there's a better way since I found my solution, but I use:

    setdisplayresolution -orientation:90
    

    in my oemcustomization.cmd on first boot.

    Unfortunately, this exe is part of IOT_TOOLKIT which is not intended for retail ffus. So I took it (and folderpermissions.exe) and put them into a separate cab file I call PartialToolkit

    <?xml version="1.0" encoding="utf-8"?>
    <identity xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        name="PartialToolkit"
        namespace="Zetec"
        owner="$(OEMNAME)"
        legacyName="$(OEMNAME).Zetec.PartialToolkit" xmlns="urn:Microsoft.CompPlat/ManifestSchema.v1.00">
        <onecorePackageInfo
            targetPartition="MainOS"
            releaseType="Production"
            ownerType="OEM" />
        <files>
            <file
                destinationDir="$(runtime.system32)"
                source="setdisplayresolution.exe" />
            <file
                destinationDir="$(runtime.system32)"
                source="folderpermissions.exe" />
        </files>
    </identity>


    Monday, October 14, 2019 3:29 PM
  • Hello Emanuele Leoni,

    You can also use Device Portal to change the display orientation. In the device settings tab in device portal, you will find the "Display Orientation" option.


    Best Regards,

    Michael


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, October 15, 2019 2:03 AM
    Moderator
  • Hi Michael,
    thanks for your reply, but I can't use this way because in that dragonboard runs on startup my UWP app and It isn't to access in Device Portal.

    Best regards,
    emanuele

    Thursday, October 17, 2019 1:02 PM
  • Hi Matelich,
    thanks for your reply.
    So, I have to put this code in my SD Card in order to run on every dragonboard starts?

    This is my usually steps:

    1. put iso image Iot Core on my dragonboard
    2. set data, keyword, wifi connection and display orientation directly on device
    3. upload my UWP app and set it as Startup app

    Casually, our kiosk lose display orientation and shows my app not corectly, so I would like to set on every start the correct orientation.

    Many thanks,
    emanuele

    Thursday, October 17, 2019 1:09 PM
  • Hello emanuele,

    Yes, that would be the route I would go. Just put the call outside the registry checks of oemcustomization.cmd so it is run every time.

    It would also be possible to setup your UWP app to be able to change the orientation if you have the .exe available. See for example this registry key that is set in my oemcustomization.cmd.

    reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher" /f /v AllowedExecutableFilesList /t REG_MULTI_SZ /d "c:\windows\system32\cmd.exe\0c:\windows\system32\ApplyUpdate.exe\0C:\Windows\System32\WindowsPowerShell\v1.0\Powershell.exe\0C:\Windows\System32\shutdown.exe\0C:\Windows\System32\powercfg.exe\0C:\Windows\System32\setrtc.exe\0C:\Windows\System32\setdisplayresolution.exe\0"

    Which you would use like

    await ProcessLauncher.RunToCompletionAsync(@"C:\Windows\System32\setdisplayresolution.exe", "-orientation:90");

    And, of course, this requires

        <iot:Capability Name="systemManagement" />

    in your Package.appxmanifest.

    Thursday, October 17, 2019 1:18 PM
  • Hi Matelich,
    your solution works fine and I thank you very much.
    In your experience, is it possible to make "reg add ..." command directly in UWP?

    Best regards,
    emanuele

    Friday, October 18, 2019 3:13 PM
  • Hello emanuele,

    No, it would not be possible. Something with administrator privileges will need to configure that. The easiest place to do that is the OEMCustomization.bat file, though that assumes you're building your own ffu.

    If you're using a pre-built ffu from somewhere, you'd need to see if it offers you the ability to execute commands at startup through some other means.

    Friday, October 18, 2019 3:34 PM
  • Hello Matelich,
    I use pre-built ffu for dragonboard.
    How can I make a custom ffu in order to place in it OEMCustomization.bat file?
    Have you seen any guide or help documentation?

    Best regards,
    emanuele

    Wednesday, October 23, 2019 10:16 AM
  • Hi Emanuele,

    https://docs.microsoft.com/en-us/windows-hardware/manufacture/iot/iot-core-manufacturing-guide

    The guide is there and its pretty straightforward to follow. Its a fair amount of work and indecision about what to cut and what to keep. Having been through this for a little while now, I'd advise resisting the temptation to cut things. It can come back to bite you.

    Not sure where you got your image, but you may be able to get the original source to just start from that template.

    Good luck!

    Thomas

    Wednesday, October 23, 2019 3:08 PM