Вопрос

I made a small application on Windows 7, using Unity 3D, by the way. The application consists of an executable and a data folder. When the data folder is in the same directory as the executable, double clicking the executable will run the app normally.

Since I wanna use it as a screen saver, I simply changed the extension name of the executable from EXE to SCR and then I could install it by right-clicking the executable and choosing 'Install' in the menu. Thus the system could find my app as a screen saver.

However, when I copied what I built and tried the same steps on another computer with Windows XP, there were problems. I could run the app itself, but when I installed it as a screen saver, there'd be an error message indicating that the data folder couldn't be found. So my question is what I should do to make an app more than a EXE file work as a screen saver on Windows XP.

Это было полезно?

Решение

The data folder isn't found because by default when running as a screensaver the "current" directory it runs from is %WINDIR%\system32. The easiest way to get around this is copy your _Data folder to the relevant path (eg C:\Windows\system32\_Data).

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top