Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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
 
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 12-Oct-12 8:15am
Comments
Sergey Alexandrovich Kryukov at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 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)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 DamithSL 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 12 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100