Jump to content

help to get access system volume information

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
onlinessp

onlinessp

    Newbie

  • Members
  • Pip
  • 2 posts
Hi,


Sorry to respectable sir/mam because i put my last question absolutely in wrong manner now i am going to mention some details

i write the following code for the file searching in my anti virus and it give exception when it scan "system volume information " folder
please help me by editing this code that it also give me the list of all files in "system volume information" folder

code is:

I am using c# language
***********************************************************************

//get the drive names on the target computer
            DriveInfo[] drives = DriveInfo.GetDrives();
            foreach (DriveInfo drive in drives)
            {
                //Console.WriteLine("Drive: {0} {1}", drive.Name, drive.DriveType);
                comboBox2.Items.Add(drive.Name);
                if (drive.DriveType.ToString() == "Fixed")
                {
                    try
                    {
                        //Search for the folder in each drive
                        string[] dirs = //Directory.GetDirectories(drive.Name, "MySql", SearchOption.AllDirectories);
                        Directory.GetDirectories(drive.Name,"*.*",SearchOption.AllDirectories);
                        comboBox1.Items.Add(dirs.Length);
                        foreach (string dir in dirs)
                        {
                            comboBox1.Items.Add(dir);
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.ToString());
                    }
                }
            }

*********************************************************************** i am waiting for your kind replyThumbs Up

Edited by Jaan, 20 April 2010 - 03:00 AM.
Please use code tags when you are posting your codes!


#2
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
an C# application needs to have Admin rights including the account that runs the program.Please run the program as Admin & get back.

#3
onlinessp

onlinessp

    Newbie

  • Members
  • Pip
  • 2 posts
I already using Admin account i think there must be other problem can any other solution exist in the form of coding.
i am waiting for your reply.
:)thanks