Solved

vb12 cannot find file that is there!!

Posted on 2013-12-02
2
284 Views
Last Modified: 2013-12-08
Hi Experts,

The following code

       If My.Computer.FileSystem.FileExists("c:\windows\system32\drivers\agp447.sys") Then
            MsgBox("File found.")
        Else
            MsgBox("File not found.")
        End If
        End

always messages " FILE NOT FOUND "....but the file is there! I put it!

How can I make it detect it there? in that particular path?
It used to work properly for many years until yesterday that I installed AVG PC TUNEUP and already uninstalled it but even then..

Also used attrib "c:\Windows\system32\drivers\agp447.sys"
and it says it has only atribute 'a'

using it in several win7 stations.... that are still working good...
only this pc is giving me the problema but  I am afraid it may start appearing in the rest.
Regards,
0
Comment
Question by:rguillermo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Accepted Solution

by:
Peter Hutchison earned 500 total points
ID: 39691296
Try changing the condition to File.Exists(c:\Windows\system32\drivers\agp447.sys") which should work in .NET code
0
 

Author Closing Comment

by:rguillermo
ID: 39704371
Thank you!!
0

Featured Post

Why You Need a DevOps Toolchain

IT needs to deliver services with more agility and velocity. IT must roll out application features and innovations faster to keep up with customer demands, which is where a DevOps toolchain steps in. View the infographic to see why you need a DevOps toolchain.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question