![]() I manually opened powershell from windows and ran the second half after saving the first half. I tested on my system and I have admin rights. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. If the Answer is helpful, please click " Accept Answer" and upvote it. In the Target box in Shortcut tab it could be like this C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File "C:\test\scale.ps1" 2Ĭ:\test\scale.ps1 is path of the script and 2 is the value of the parameter $scaling You can create a shortcut to run the script. $apicall::SystemParametersInfo(0x009F, $scaling, $null, 1) | Out-Null Uint = Add-Type -MemberDefinition $source -Name WinAPICall -Namespace SystemParamInfo –PassThru Public static extern bool SystemParametersInfo( $source = EntryPoint = "SystemParametersInfo")] The function can be called in a powershell script as follows (tested in Windows 10) # $scaling = 0 : 100% (default) ![]() The display scaling can be changed with SystemParametersInfo and SPI_SETLOGICALDPIOVERRIDE ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |