Why does my program say that “folder does not exist” on startup in Windows 2008?

We have a Delphi program, whose task is similar to a utility program. It tracks a specific folder for a certain period of time and works fine on Windows XP and 2003, but on Windows 2008r2 64bit, when it wants to create an automatic folder, it will show this message:

Folder ... does not exist. The file may have been moved or deleted.

This message causes the program to stop, which is not very good; it must not be interrupted. What can I do about this?


PS: I really don't know if it's worth publishing my problem in Qaru or Server Fault, so I figured it should be here.

+3
source share
5

.... , ( x64 2 ), ?

+4

Windows Server 2008 "" . : ", , , ". Windows "display". cmd.exe, , , .

+2
+2

. , env, , , .

( 2 ), , .

, env vars, APPDATA, LOCALAPPDATA .. , Win7 2k8. , - . , , , , ,% USERPROFILE%, . % ProgramData%.

- cmd.exe, set, , , , env vars . cmd.exe 32- . Process Explorer 32- 64- .

Switching the application to a 64-bit build will solve most of the virtualization problems, but not the env var extension. Also, if your application deals with system folders, you need to request increased mileage from the code, or even better to make a manifest and declare it there. Then the OS will scream at the user if his UAC is turned on, and your application will avoid this second virtualization. BTW, virtualization is managed through group policies so that it can be present on some mailboxes and absent on others.

+1
source

Source: https://habr.com/ru/post/1754641/


All Articles