Autoexec script on ...
 
Notifications
Clear all

We had a major storm through here recently and we suffered damage to the house roof and ceilings. I just received the quote to repair. I’m hoping that a small fraction of the 80,000 odd people that download SDIO and/or Desktop Info every month won’t mind chipping in a few dollars to help out. Click on the big blue button at the bottom of the page to help us keep a roof over our heads, literally!

Guests have read-only access to our forums. If you wish to participate you will need to register. Be sure to activate your account from the email sent to you when you register.

Autoexec script on load

6 Posts
3 Users
0 Reactions
456 Views
(@lobsi)
Active Member Registered
Joined: 4 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: 132
 

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: 4 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: 132
 

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: 4 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: 7 years ago
Posts: 1501
 

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