Fivecord 0 Posted November 7, 2021 I created a Service application, put it in the System32 folder and installed it via /install. Now when I want to start the service I get the error message Error 2: The system cannot find the file specified. After finding no help in Google, I created and built a new Service application (thus an empty service project) and also put it in the System32 folder and installed it. When I started it I got the same error. I have absolutely no idea which file can't be found. Do I have a wrong setting somewhere in the project? Anyone have an idea? PS: I'm using Delphi 11 and Windows 10. Share this post Link to post
Cristian Peța 107 Posted November 7, 2021 (edited) If your OS is 64 bit and you have a 32-bit service then search an other place like SysWOW64. Edited November 7, 2021 by Cristian Peța Share this post Link to post
Cristian Peța 107 Posted November 7, 2021 "On 64-bit versions of Windows, you have two separate Program Files folders. But it doesn’t end there. You also have two separate system directories where DLL libraries and executables are stored: System32 and SysWOW64. Despite the names, System32 is full of 64-bit files and SysWOW64 is full of 32-bit files. " https://www.howtogeek.com/326509/whats-the-difference-between-the-system32-and-syswow64-folders-in-windows/ Share this post Link to post
Fivecord 0 Posted November 7, 2021 Thanks, now it works. The folder names don't make sense, but we'll learn to live with it. Share this post Link to post
David Heffernan 2353 Posted November 7, 2021 You shouldn't add any files to the system directories, either system32 or syswow64. They are for the system. 1 Share this post Link to post
Remy Lebeau 1436 Posted November 8, 2021 (edited) On 11/7/2021 at 7:17 AM, Fivecord said: I created a Service application, put it in the System32 folder and installed it via /install. Do NOT put non-system files in the System32 folder, they don't belong there. You can install your service from your own folder just fine. On 11/7/2021 at 7:49 AM, Fivecord said: No, a 32-bit service app On a 64bit Windows, the System32 folder is for 64bit files only. 32bit files would have to go in the SyWOW64 folder instead. But again, don't put your service app in either folder to begin with. Edited November 8, 2021 by Remy Lebeau Share this post Link to post
Lars Fosdal 1793 Posted November 9, 2021 FWIW: We have several 32-bit services. There is no reason what so ever to put them in one of the Systems folders. Share this post Link to post
Fivecord 0 Posted November 10, 2021 Hi Guys, I'm will definitely not put the service in the System-folder! 😉 I learned my lesson thanks to you guys! Gtrz Share this post Link to post
Lars Fosdal 1793 Posted November 11, 2021 The appropriate place would be something like \Program Files (x86)\<Your Company or System Name>\<Services>\YourServiceHere.exe 1 Share this post Link to post