Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I am making a net framework 2.0 app in vb.net
and I have tried all popular methods to start a file
(I want it to start mrt.exe in the user's system32 folder)
but it doesn't work and I get a file not found error.

I have tried

System.Diagnostics.Process.Start(Environment.GetFolderPath(SpecialFolder.System) & "\MRT.exe")


and

VB
Dim objProcess As System.Diagnostics.Process
            objProcess = New System.Diagnostics.Process()
            'objProcess.StartInfo.Arguments =
            objProcess.StartInfo.FileName = "MRT"
            'objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
            objProcess.Start()
            'Wait until it's finished
            'objProcess.WaitForExit()
            'Exitcode as String
            'Console.WriteLine(objProcess.ExitCode.ToString())
            objProcess.Close()


and also the Shell(...) command

but nothing works!! The file is there I can open it from the explorer!

Please help me..
Posted
Comments
Sergey Alexandrovich Kryukov 12-Oct-12 13:36pm    
I also don't have this file in this directory; chances are, you don't have it there. Why?
--SA
OriginalGriff 12-Oct-12 14:08pm    
Hi SA - MRT is the malicious software removal tool: you probably do have it, unless you have set your PC to not download it.

1 solution

MRT.EXE is the Microsoft Malicious Software Removal Tool.
It does indeed live in the system32 folder (of PC's that are set to download it on a regular basis), but it has no user interface. As a result, you will probably never know whether you are successfully running it or not.

Your first version should work fine, but since there is no display at all involved, and it will likely shut itself down pretty quickly it is unlikely that you will ever know if it worked.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 12-Oct-12 14:48pm    
Ah, this is the answer. A 5.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900