Search the Community
Showing results for tags 'target'.
Found 3 results
How to retrieve the target executable path from a process. My system is effected with IMG001.exe virus and I remove the folders created by it daily but still it is creating the folders everytime I login to my PC. My Antivirus is not detecting it. So I thought to create a process in AutoIT to check for the process name IMG001.exe and retrieve the process target exe to a log file, so that I can track where it is putting these files. With ProcessExists ( "process" ) , i can get the process ID. But how to get the target location of the executable of the process.??
I wrote below code to delete a file. But when I am trying to delete a shortcut, it it deleting target file instead of shortcut when I created a context menu entry for this executable. The executable is working fine if we use it normally instead of context menu.But with COntext menu it is taking the target instead of shortcut. By using the below registries. Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\*\shell\Delete Permanently\command] @="\"C:\\Program Files\\Permanent Delete\\Delete Permanently.exe\" \"%1\""And compiled the below code to executable. DeleteFile($CmdLine[$i]) ; Adding the path through CMD line argument. Func DeleteFile($sFilePath) Local $iDelete = FileDelete($sFilePath) ; Display a message of whether the file was deleted. If $iDelete Then MsgBox($MB_ICONINFORMATION, "Deleting ...", "The file was successfuly deleted: " & $sFilePath,10) Else MsgBox($MB_ICONERROR, "Deleting ...", "An error occurred while deleting the file: " & $sFilePath & @CRLF & "Please check whether it is in use by any process",10) EndIf EndFunc