|
-
Mar 17th, 2009, 07:49 AM
#1
Thread Starter
Lively Member
[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
-
Mar 17th, 2009, 08:05 AM
#2
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.
-
Mar 17th, 2009, 08:11 AM
#3
Thread Starter
Lively Member
Re: [2008] Search Problem on VISTA
i am running as root...
and lol i dont know about these "meta-data"
-
Mar 17th, 2009, 09:05 AM
#4
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?
-
Mar 17th, 2009, 03:12 PM
#5
Thread Starter
Lively Member
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
-
Mar 18th, 2009, 02:42 PM
#6
New Member
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
-
Mar 18th, 2009, 02:59 PM
#7
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Mar 18th, 2009, 03:05 PM
#8
New Member
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?
-
Mar 18th, 2009, 03:09 PM
#9
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 Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API 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 
-
Mar 18th, 2009, 03:15 PM
#10
New Member
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!!!!
-
Mar 19th, 2009, 02:43 PM
#11
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|