![]() ![]() ![]() However, it still would be handy if the application could control if the privileges are going to be elevated. If you don't want to use hard coded elevated privileges, you can remove the manifest from the project. Option 2: Elevate privileges during the application startup The application itself would run without admin privileges, it just wouldn't be able to investigate all folders. The downside of this approach is that the privilege requirement is hardcoded into the application. The same happens when you run the compiled exe. The newly created manifest file contains typical configuration options in comments so just select the requireAdministrator level like followingĪfter this has been done when you start the program, Visual Studio will ask for administrator privileges. ![]() The next step is to add proper trust info requirements. for the project and add an Application Manifest File. This is done by adding a manifest file into the project. Alternative 1 is ensure that administrator privileges are granted and if not, then the application won't run. Since I wanted to be able to search through all directories, the first thing is to set up the project so that it uses administrator privileges. Next we'll go through how the program was actually made. So here are a few pictures for the outcome. The user interface is responsive and informative while investigating the directories.The program has elevated privileges in order to access all folders.Visually show cumulative directory space usage. ![]() However, I didn't find a suitable solution easily so I decided to make a small program for the task.įor the program I had few requirements it should satisfy: The problem of this article has been touched several times, how to gather information about disk space usage for files and directories within a disk drive. Download DirectorySizesVB.zip - 20.7 KB. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |