Here's my full concept: I want to be able to search the entire C:\ & D:\ to see if a certain file exists on the drive - not edit/delete/create, I just want to know if it exists or not.
Example: I want to be able to scan the entire D:\ to see if "Testing321.exe" exists on the drive. The problem I have is I'm able to scan something like "C:\Users\Dan\Desktop" but I'm unable to scan "C:" because I'm given an error related to insufficient permissions even though I have given the program full administrator permissions in the Manifest.
Error:
Unhandled exception. System.UnauthorizedAccessException: Access to the path 'C:\Documents and Settings' is denied. at System.IO.Enumeration.FileSystemEnumerator
1.CreateRelativeDirectoryHandle(ReadOnlySpan
1 relativePath, String fullPath) at System.IO.Enumeration.FileSystemEnumerator1.MoveNext() at System.Collections.Generic.LargeArrayBuilder
1.AddRange(IEnumerable1 items) at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable
1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source) at System.IO.Directory.GetFiles(String path, String searchPattern, SearchOption searchOption) at Alpha.Program.Main(String[] args) in C:\AlphaSS\Alpha\Alpha\Program.vb:line 80
Code:
Dim Path As String
Console.WriteLine("Enter Directory to search [Phantom DLL]: ")
Path = Console.ReadLine()
Dim FolderPath = Path
For Each filePath In Directory.GetFiles(FolderPath,
"RXEXV2.dll",
SearchOption.AllDirectories)
If filePath IsNot Nothing Then
Console.WriteLine("DETECTED: Phantom Menu DLL Found: " & filePath)
Else
Console.WriteLine("Nothing Detected")
End If
This code above is essentially an idea I have in mind which will scan a player's computer for certain (cheat) files and if those files are found it will output it back to the console.
If anyone has a solution to this, please let me know!