Results 1 to 11 of 11

Thread: [2008] Search Problem on VISTA

  1. #1

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    [2008] Search Problem on VISTA

    Hey there,

    I was working on a project that was requiring a "file search" operation...
    so i used the following code...


    Code:
    Dim vbforums As New IO.DirectoryInfo(FileIO.SpecialDirectories.Desktop)
    For Each dir As IO.DirectoryInfo In vbforums.GetDirectories
    
    If Not ((dir.Attributes And IO.FileAttributes.System) = IO.FileAttributes.System) Then
    ListBox1.Items.AddRange(IO.Directory.GetFiles(dir.FullName, "*.txt", IO.SearchOption.AllDirectories))
    End If
    
    Next
    Well, i was running the whole program on my winXP box but
    unfortunatelly when i finished the project (22 days later)
    and tried it on Vista it simply didnt work

    So do i have to change something?
    I dont even want to think that i have to use Dir1 and File1 lol

  2. #2
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: [2008] Search Problem on VISTA

    You might need to be running with security privileges to be able to access those directories. Remember, Vista likes to do everything on a user-level. Other than that, it should work fine.

    Other than that, only thing I can think of is the FileAttributes thing. Does Vista even have System attributes any more? I know they implemented a major file-meta data scheme (where any file can store meta-data) and was wondering if that information was moved to there. How you'd access it though, I wouldn't know.
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  3. #3

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Re: [2008] Search Problem on VISTA

    i am running as root...

    and lol i dont know about these "meta-data"

  4. #4
    PowerPoster Jenner's Avatar
    Join Date
    Jan 2008
    Location
    Mentor, OH
    Posts
    3,712

    Re: [2008] Search Problem on VISTA

    I don't work with Vista on a day-to-day basis, so I don't know the details, but what I remember hearing at it's launch, one of the hot "new features" was that any file could be tagged with meta-data. thus, you could for example tag picture files with location of shot, people who are in it, date taken, comments, etc; and all this is done natively by the OS.

    How, I don't know since the physical filesystem is still NTFS. The idea is when you used the new Windows Search, it would search this meta data as well. So, searching for "San Francisco" would bring up documents with the term in them, pictures that were taken there (even if the filename of the jpg was something like "DF00231.jpg") and what-not.

    I'm wondering if they moved information like the System File attribute there as well. Perhaps someone more familiar with Vista would know.

    Have you tried removing the If() statement from your code and trying it on the Vista box?
    My CodeBank Submissions: TETRIS using VB.NET2010 and XNA4.0, Strong Encryption Class, Hardware ID Information Class, Generic .NET Data Provider Class, Lambda Function Example, Lat/Long to UTM Conversion Class, Audio Class using BASS.DLL

    Remember to RATE the people who helped you and mark your forum RESOLVED when you're done!

    "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe. "
    - Albert Einstein

  5. #5

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Re: [2008] Search Problem on VISTA

    oh now i got what u said, well... stupid feature, definatelly not hot lol...
    and yes i removed the "if" case and run it on my vmware~vista with no results...
    thanks for the answer though, i guess it took u a while to explain me all these things lol

  6. #6
    New Member
    Join Date
    Mar 2009
    Posts
    4

    Re: [2008] Search Problem on VISTA

    hi I was looking for the same thing...
    I have seen several links around... but noone has the solution

    btw dis forum seems cool, and thnx to ur request and google now I am member of it hehe
    I hope to take our answer after all

    greetz
    ~stargazer

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] Search Problem on VISTA

    Even when you are logged into Vista as Admin its not a true administrator. Plus you need to specify in a manifest file to elevate your process to run under administrator credientials otherwise it may come across File Virtualization issues where a file appears to be in a location but its really just a shortcut to the uses appdata folder etc.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    New Member
    Join Date
    Mar 2009
    Posts
    4

    Re: [2008] Search Problem on VISTA

    so what do u propose robdog?
    vista's search engine is working without administration so
    there must be a way to do it with programming right?
    isnt that logical?

  9. #9
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [2008] Search Problem on VISTA

    Vistas search engine is not a 3rd party program though. Use a manifest file and elevate your entire app (not really a good security measure) or write another process that gets invoked by your app with elevation so only a small part of your program runs asa administrator.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    New Member
    Join Date
    Mar 2009
    Posts
    4

    Re: [2008] Search Problem on VISTA

    hmm and how can i do what u describe?
    can u give me some links or something to look into?
    or maybe an example if u dont mind!!!!

  11. #11

    Thread Starter
    Lively Member GhostRider888's Avatar
    Join Date
    Apr 2007
    Posts
    113

    Re: [2008] Search Problem on VISTA

    yes any link would be useful or at least another way to
    search... otherwise i guess i have to use Dir1 and ListBox1
    which will make my project pages longer...

    thanks for the answers anyway

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width