Autoexec script on ...
 
Notifications
Clear all

Autoexec script on load

6 Posts
3 Users
0 Reactions
166 Views
(@lobsi)
Active Member Registered
Joined: 3 years ago
Posts: 6
Topic starter  

Hi Glenn,
Is there a possibility to automatically execute a powershell script on initial load?
This would enable us to fix the scaling issue. We'd like to change monitor resolution to a low value and back to the original value by script. The scaling is mutch better afterwards.


   
Quote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 4 years ago
Posts: 129
 

You should be able to add that by using the CMD option with an "interval:0" and "hidden:1" options, telling it to run once on load and never run again, and not show any output.


   
ReplyQuote
(@lobsi)
Active Member Registered
Joined: 3 years ago
Posts: 6
Topic starter  

Thank you, Nathan K. Your advice is working although it actually can't be used to solve the scaling problem.


   
ReplyQuote
Nathan_K
(@nathan_k)
Estimable Member Registered
Joined: 4 years ago
Posts: 129
 

Sorry to hear that it's not doing the trick. What is it (or is it not) doing that causes it not to resolve the issue?


   
ReplyQuote
(@lobsi)
Active Member Registered
Joined: 3 years ago
Posts: 6
Topic starter  

Executing our script during onload would start to early (in our case the main form has to be loaded before script execution).

Fortunately I found the solution to our problem in Windows compatibility settings: DTI is DPI unaware.

Solution
Setting following compatibility flag fixed our scaling issues:
[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionAppCompatFlagsLayers]
"C:\Program Files\DesktopInfo\DesktopInfo64.exe"="~ DPIUNAWARE"


   
ReplyQuote
Glenn
(@glenn)
Member Admin
Joined: 6 years ago
Posts: 1312
 

yeah that was my next thought given I seem to having trouble getting the buttons scaled properly. Setting the dpiunaware compatibility setting makes it size properly but there is some fuzziness to it I believe so it's a trade-off.


   
ReplyQuote
Glenn's Page