When entering the program, if there is no user86x.dll file user86x.dll that it does not enter and user86x.dll message. user86x.dll in the C:\Windows\System32\ section, but now there is no user86x.dll file in the System32 folder, but you still have to enter the program. The question is how do I implement it.

 fileNames :=('C:\Windows\System32\user86x.dll'); if FileExists(fileNames)=False then else begin ShowMessage('упс!(^_^)'); Halt; end; 

    1 answer 1

     if FileExists(fileNames)=False then else halt 

    same as

     if FileExists(fileNames) then halt 

    that is, you now have a message on the presence of a file.

    Need to

     if not FileExists(fileNames) then halt 

    Just not the logical expression used.

    • you mean this way fileNames: = ('C: \ Windows \ System32 \ user86x.dll'); if not FileExists (fileNames) then halt; else begin ShowMessage ('óïñ! (^_^)'); // Halt; end; - delphi
    • if fileexists - the condition is satisfied. if fileexists = false is not executed. - Albert Fomin
    • Now in the text of the issue showmessage works in the presence of the user86x.dll file, and not vice versa as intended. - Albert Fomin
    • @ delphi, you have the then and else branches mixed up. Either else transfer to then or invert the condition. - German Borisov