My OS is Windows 7 Ultimate so it's really "c:\windows\system32"

On Mar 16, 1:04 pm, Cerebrus <[email protected]> wrote:
> Also make sure that the file is not located in WINNT\System32
>
> On Mar 16, 9:43 pm, Cerebrus <[email protected]> wrote:
>
> > Try setting "UseShellExecute" of the ProcessStartInfo object to true.
>
> > On Mar 16, 7:18 pm, P Square <[email protected]> wrote:
>
> > > I'm trying to run defrag.exe inside a vb.net console app and it's
> > > giving me an error "The system cannot find the file specified" it used
> > > to work so i don't get the problem. Here's my code
>
> > > Dim oApp As New ProcessStartInfo
>
> > > oApp.FileName = "c:\windows\system32\defrag.exe"
> > > oApp.Arguments = "/C"
> > > oApp.CreateNoWindow = True
>
> > > Dim oProcess As Process = Process.Start(oApp)
>
> > > I even tried using shell command and no luck but if I enter defrag in
> > > command prompt it works? It looks like the console app doesn't see c:
> > > \windows\system32\defrag.exe
>
> > > Please Help !!!- Hide quoted text -
>
> > - Show quoted text -

Reply via email to