Jump to content

Recommended Posts

Posted

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

 

Posted (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 by Musashi
typo

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

Posted

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

Posted
8 minutes ago, pepito said:

Do you have this problem to?

@Nine was quicker (and correct) :lol: !

#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

 

Musashi-C64.png

"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move."

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...