Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

vb12 cannot find file that is there!!

Posted on 2013-12-02
2
Medium Priority
?
286 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 20

Accepted Solution

by:
Peter Hutchison earned 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 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