pepito Posted October 29, 2020 Posted October 29, 2020 Hi all, i woul like to start a systemscan with windows's MRT (maleware remove tool) but i can't launch it from my script. I got error like "mrt not found" here is my script RunWait(@ComSpec & " /c " & "Start /wait mrt.exe", @SystemDir) this command work in cmd; Do you have this problem to? Regards
Musashi Posted October 29, 2020 Posted October 29, 2020 (edited) Since mrt is an .exe, you can start the program directly via Run/RunWait (without using COMSPEC ). For this purpose use the complete path. EDIT @pepito : Here an example using Notepad.exe Local $sFilename = "C:\Windows\System32\notepad.exe" If FileExists($sFilename) Then RunWait ($sFilename, "", @SW_SHOW) If @error = -1 Then ConsoleWrite("! Error running " & $sFilename & @CRLF) Else ConsoleWrite("! " & $sFilename & " not found" & @CRLF) EndIf Edited October 29, 2020 by Musashi typo "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
pepito Posted October 29, 2020 Author Posted October 29, 2020 hi Masashi, I've try your solution : ! C:\Windows\System32\mrt.exe not found. it's not working but C:\Windows\System32\mrt.exe in CMD works.... Do you have this problem to? Thx
Nine Posted October 29, 2020 Posted October 29, 2020 Try inserting those lines at the top of your script : #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection(False) “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Debug Messages Monitor UDF Screen Scraping Round Corner GUI UDF Multi-Threading Made Easy Interface Object based on Tag
Musashi Posted October 29, 2020 Posted October 29, 2020 8 minutes ago, pepito said: Do you have this problem to? @Nine was quicker (and correct) ! #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection(False) Local $sFilename = "C:\Windows\System32\mrt.exe" If FileExists($sFilename) Then RunWait ($sFilename, "", @SW_SHOW) If @error = -1 Then ConsoleWrite("! Error running " & $sFilename & @CRLF) Else ConsoleWrite("! " & $sFilename & " not found" & @CRLF) EndIf "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."
pepito Posted October 29, 2020 Author Posted October 29, 2020 Yes!!!!!! Thank you all, i tried to solve this problem during many hours. never see this function. Thank you again.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now