Search the Community
Showing results for tags 'c:\windows\system32\*.exe'.
-
I'm having troubles with FileExist function. My autoit version is 3.3.14.2. I'm working with C:\windows\System32 folder. On windows 7 I use this script copied and modified from FileExist.au3 from the Autoit Help chm #include <MsgBoxConstants.au3> #include <WinAPIFiles.au3> Example() Func Example() ; Create a constant variable in Local scope of the filepath that will be read/written to. Local $sFilePath = "C:\windows\System32\PrintBrmUi.exe" ; Then try with : C:\windows\System32\printui.exe Local $sFileVersion = FileGetVersion($sFilePath, $FV_PRODUCTNAME) ;Local $iFileExists = FileExists($sFilePath) ; Display a message of whether the file exists or not. If FileExists($sFilePath) Then MsgBox($MB_SYSTEMMODAL, "", "The file " & $sFilePath & " exists. " & @CRLF & $sFileVersion) Else MsgBox($MB_SYSTEMMODAL, "", "The file " & $sFilePath & " doesn't exist." & @CRLF & $sFileVersion) EndIf EndFunc ;==>Example if the productname of the file doesn't have key words like Windows or Microsoft it say that the file do not exist... Try it it! Send me your feedbacks _________________________________________ Bouzzi