How To Build UAC Compatible Application In .NET

by Prashant 24. May 2010 06:01

We all know about a feature called User Account Control (UAC) which introduced with the launch of Windows Vista. By default, UAC is enabled and provides users a better and safer computing experience, but most of the users find it irritating when the UAC prompts everytime they try to run a program. Disabling UAC is not recommended at all.

With UAC enabled programmers find it difficult to access some of the locations on the local drive. Programatically you cannot write or create a file or directory in root partition, inside Program Files, System32 folder and some other locations. Recently I ran into a same problem where I have to access System32 folder, create new folders and copy files from one location on my system to this folder. With UAC disabled this is pretty easy, no security settings and no runtime errors or exceptions. Usually you cannot ask the users to disable UAC and then use the application, so therefore I made my application compatible with UAC and YES!!! you will be prompted with the confirmation box to run the application with administrator privileges. In Windows Vista and Windows 7, even if you are an administrator of your machine you do not have the complete access to resources even if you are an administrator. So in order to make your application run with full administrator rights follow the steps below. This will work the same if you run your application with "Run as Administrator" option which you see when you right-click the application.

Create a new application in Visual Studio. Right-click project and add a new item.

From the Add New Item box select Application Manifest File.

In the manifest file un-comment the following line:

<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />

Build your applicaton....and when the build is complete you will see the security shield icon accompanying your application icon. A dialogue box appear in front of the user to run the application with full administrative privileges.

 

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , , ,

C# | Utils | Visual Studio | Windows 7

Windows Live Writer and BlogEngine.NET

by Prashant 30. March 2010 23:57

WinLiveWriter When I started blogging last year, I used to blog the old traditional way, using admin panel and then drafting my post and that too with minimal features that can be available for blogging. The I heard about Windows Live Writer and without thinking I switch over to Live Writer. Though my early experience with Live Writer was not good and some of my posts looked weird after I post them to my blog. May be I was not that too familiar with Live Writer at that time and I drop the idea of using Live Writer to blog….but now I am and much aware about the power of Live Writer.

I am writing this post with Live Writer and that too loaded with some excellent plug-ins which allow me to do what I need to.

If you are blogger and still using the same old admin panel to blog with seriously limited features then this tool is meant for you. I am late to use this tool for blogging, but you should not.

Download the offline installer of Windows Live Essentials which includes other Live services.

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: ,

BlogEngine.NET | Utils

Visual Studio Theme Generator

by Prashant 24. March 2010 10:15

I just Got bored looking at the same code editor in Visual Studio. Same old white background and same syntax colour highlighting. So I give it a go and jump to Visual Studio options and start playing around with the option available to change the look and feel of the code editor. After trying for a while and working around with some customizations, I gave a second go and do a quick bing search in a hope that I will find some theme for my Visual Studio and Voila! I got one, not a theme but a tool indeed which allows me to customize theme as I want and the name is Visual Studio Theme Generator. It's an online free tool with some simple controls on the page which helps you in customizing your code editor by changing the main colour, background colour, foreground colour and also set he contrast. The tool also gives you the option to choose from a variety of colours. You can see the screenshot of this online tool below.

Make some customizations and click the Refresh button on the top right corner of the page to reflect the changes. Once you are finish with the customizations you can then hit the Create button to save you Visual Studio theme settings, save it to your local disk and import it using Import/Export settings wizard in Visual Studio.

I have downloaded the default theme from the page and here is how my Visual Studio code editor looks like now:

NOTE: You can read the detailed step on the website to import the settings. But before you can import the settings it is recommended that you first take the backup of your current/original Visual Studio settings. This tool is a work of javascript so before you hit it make sure you have javascript enabled for you browser.

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

Utils | Visual Studio

Manage your Azure storage with ease!

by Prashant 24. December 2009 23:30

If your are using Windows Azure for storing files here are the tools you should love to use to manage your Azure cloud storage.

Azure Storage Explorer - Codeplex

And

Cloud Storage Studio

If you don't have an Windows Azure account, then have one HERE

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , ,

Microsoft | Utils | Windows Azure

Windows Live: SkyDrive application

by Prashant 6. December 2009 02:16

We all know about Windows Live® SkyDrive® and definitely all the user would like to have a tool which would help them in organizing and managing their folders. But unfortunately I am unable to find any tool which helps us to deal in this. And as usual if you want to develop something or need an API just jump to Codeplex. Download the SkyDrive API from here (Codeplex) or from the below. But hey! I got another application with me, exactly can't remember where I got this from but really appreciate Scott's (author of this app) effort for this. It seems to be just a protoype, as it only allows you to view and download the files. Download the application and give a try and don't forget to download the SkyDrive® API also.

Download SkyDrive Application:LiveIDSkyDriveApp.zip (419.12 kb)

SkyDrive® API from Codeplex:SkyDriveWebClient.v0.8.7.zip (72.50 kb)

Share or Bookmark this post…
  • Live
  • Facebook
  • TwitThis
  • del.icio.us
  • Digg
  • DZone
  • Technorati
  • StumbleUpon
  • Google
  • E-Mail

If you enjoyed this post, make sure you subscribe to my RSS feed!

Tags: , , , , ,

API | Microsoft | Utils

Powered by BlogEngine.NET 1.5.0.7
Visit blogadda.com to discover Indian blogs

About

Name of authorPrashant Khandelwal

Programmer and Tech Enthusiast



       

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.
© Copyright 2010

Creative Commons License