t1m0thyj / WinDynamicDesktop

Port of macOS Mojave Dynamic Desktop feature to Windows

Home Page:https://windd.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WDD crashes at launch when scripts are placed in the scripts folder

mhetralla opened this issue · comments

  • WDD Version: 5.3.1 x64
  • OS Version: Windows 10 IoT Enterprise LTSC 21H2 (19044.3324)

Steps to Reproduce:

  1. Install WDD (tried with "Install for me only" and "Install for all users")
  2. Enable Powershell scripts
  3. Paste a .ps1 script in the AppData\Local\WinDynamicDesktop\scripts folder

Are you using the Microsoft Store version of WDD?: No

image

I get the above error when I run WDD without admin privileges and any Powershell script is in the scripts folder. After closing that window, WDD closes too. If I run WDD as Administrator WDD and the scripts work. I tried installing WDD in the AppData folder and in the Program Files folder, same result. Powershell seems to be working fine.
This started happening last week, without any change on the WDD settings.

debug.log:

[2023-09-07 23:42:46.329] Calculated solar data: {"polarPeriod":0,"sunriseTime":"2023-09-08T07:35:19.872+02:00","sunsetTime":"2023-09-08T20:23:51.581+02:00","solarTimes":["2023-09-08T07:07:46.333+02:00","2023-09-08T08:11:19.326+02:00","2023-09-08T19:47:52.127+02:00","2023-09-08T20:51:25.12+02:00"]}
[2023-09-07 23:42:46.363] Updated display event: {"currentTheme":{"themeId":"Mojave_XP","displayName":null,"imageFilename":"Mojave_XP_*.jpg","imageCredits":"legrisch","dayHighlight":null,"nightHighlight":null,"sunriseImageList":[6,1,3,4],"dayImageList":[5],"sunsetImageList":[4,3,1,6],"nightImageList":[2]},"daySegment2":1,"daySegment4":3,"displayIndex":-1,"imageId":2,"lastImagePath":null,"nextUpdateTime":"2023-09-08T07:07:46.333"}
[2023-09-07 23:42:46.370] Setting wallpaper to D:\Users\mhet\AppData\Local\WinDynamicDesktop\themes\Mojave_XP\Mojave_XP_2.jpg
[2023-09-07 23:42:46.616] Running scripts with arguments: {"daySegment2":1,"daySegment4":3,"imagePaths":["D:\\Users\\mhet\\AppData\\Local\\WinDynamicDesktop\\themes\\Mojave_XP\\Mojave_XP_2.jpg"]}
[2023-09-07 23:42:46.619] Started timer for 19499,714 sec
[2023-09-07 23:42:46.626] Running PowerShell script: -NoProfile -ExecutionPolicy Bypass -Command "& \".\ChangeWindowsAppTheme.ps1\" -daySegment2 1 -daySegment4 3 -nightMode 0 -imagePath \"D:\Users\mhet\AppData\Local\WinDynamicDesktop\themes\Mojave_XP\Mojave_XP_2.jpg\""
[2023-09-07 23:42:46.626] Running PowerShell script: -NoProfile -ExecutionPolicy Bypass -Command "& \".\ChangeWindowsSystemTheme.ps1\" -daySegment2 1 -daySegment4 3 -nightMode 0 -imagePath \"D:\Users\mhet\AppData\Local\WinDynamicDesktop\themes\Mojave_XP\Mojave_XP_2.jpg\""

Update: I installed Powershell 7.3.6 and it solves the issue, so it seems to be a problem with Windows Powershell that is included with the OS, it might have been updated by Windows Update.

I have not tested WinDD extensively with Powershell 5 but I believe it should be supported. Closing since updating to the latest Powershell version fixed the issue.