Hi,
Can it be it is because the Windows user account running the app directly versus the one running the app after restart (i.e. Admin) is different?
Also, does your app have any dependency on the current directory where the app is running?
If so, possibly you could resolve this by SetCurrentDir(ExtractFilePath(Application.EXEName));
I try force CurrentDir before restart, and before call my FileExists, but it doesn't work.
wusetup.exe is compiled with a manifest to elevate to admin privs (via UAC / because it needs permission to access \Program files for updating the application) , so, it would appear that as admin, FileExists() doesn't see the same files as a regular Windows user account does? Sadly, as long as WebUpdate is used to replace running EXEs from \Program Files UAC is needed. If you app is not stored under \Program Files, you could compile TWebUpdate in non-UAC mode and then it will run a version of wusetup.exe that doesn't elevate to admin. So, if your app is not under \Program files, it could be worth trying that.
Hello,
oh ok, I understand: if I run PTest.exe as administrator, I can not find the file.
Hi,
Sorry, to replace an EXE file under c:\Program Files , it is required to use UAC to elevate to admin privs as normal user privs cannot write to c:\Program Files.
oh, sorry for my bad explanation and my missunderstanding.