Advertisement
Guest User

Untitled

a guest
Apr 19th, 2014
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. program SO22990909;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6. SysUtils;
  7.  
  8. const
  9. STR_SYSNATIVEPATH = 'c:windowssysnative';
  10. STR_SYSTEM32PATH = 'c:windowssystem32';
  11. STR_DETECTFILE = 'wups2.dll';
  12.  
  13. procedure CheckFile(Filename : String);
  14. begin
  15. if FileExists(Filename) then
  16. Writeln(Format('file %s found', [Filename]))
  17. else
  18. Writeln(Format('file %s not found', [Filename]));
  19. end;
  20.  
  21.  
  22. begin
  23. try
  24. CheckFile(STR_SYSTEM32PATH+STR_DETECTFILE);
  25. CheckFile(STR_SYSNATIVEPATH+STR_DETECTFILE);
  26. except
  27. on E: Exception do
  28. Writeln(E.ClassName, ': ', E.Message);
  29. end;
  30. ReadLn;
  31. end.
  32.  
  33. c:windowssyswow64testfile.dll
  34.  
  35. FileExists('c:windowssystem32testfile.dll')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement