.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

how to force my C# Winforms program run as administrator on any computer ?

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Windows Application
hi how to force my C# Winforms program run as administrator on any computer ? and any kind of OS ? i need code solution (any sample code will be excellent) thank's in advance

View Complete Post

More Related Resource Links

How can I have my program access another program that is running on the same computer?

We use 5 different applications at work. There is a lot of copying and pasting and going back and forth between applications. It can be very draining. The main program that I want to interface with is a ticketing application. It was not designed to be manipulated by another program, only a person. One way would be to write a program which moves the mouse around and types things into the fields and navigates between the different windows. But the problem with that is the user (me) would not have the screen/mouse/keyboard free while this was happening as the program would be using it. How would you go about just getting the data straight from memory? If that is not an option could I move the program off screen and manipulate it there? I don't know what language the program was written in. Maybe I could decompile it? Is there a good way to monitor the information it sends across the network? If so I could just have my program make the same requests and then completely bypass the current program.   Do you have any ideas?

How to prevent a C# Winforms program from appearing in Task Manager?

How to prevent a C# Winforms program from appearing in Task Manager?   thank's in advance

Executing a program on a remote computer


I'm trying to execute a program on a remote computer, using code ofcourse, and i'm trying the following:

The function rerturns code 8 which says "unknows failure" and the program i was trying to execute (or any other program for that matter) doe's not run.
Nothing happens except that on the remote computer the mouse curser changes for a split of a second. I know the connection is OK because of that - plus if i change one of the parameters (computer name, user name, password) to a wrong one, the program exits.

Does anyone know what might be the problem?


Getting the "Do you want to allow the following program to make changes to this computer?" question

My company is developing a program that when it's installed on a Client Windows 7 computer, the user (which is a Standard User, but program was installed by an Administrator) is getting the "Do you want to allow the following program to make changes to this computer?" question.  This wouldn't be so bad, but the program is forcing a login by the Administrator to allow the program to run.  The message box is showing "To continue, type an administrator password and then click Yes."

I have digitally signed the application hoping that would have eliminated this but still getting the login prompt.

The users could live with the prompt about the confirmation, but why is the administrator's login being required?

If it matters the computer I'm testing this on and getting this result is a Windows 7 Professional 64bit.  The program executable is a compiled VB.Net windows application using VS2008.  The executable itself is compiled for an x86 CPU type due to one 3rd party control we are using which isn't AnyCPU compatible.


how to force that any type of file , will open with my program ?


i have build program that can open *.sdf files and show all the table & the data.

how to force that any *.sdf file in my computer will open with my program ?

thank's in advance

Program for Format Conversion of An Image

.NET provides extensive support for image conversion. Any image can be processed from one format to another. Most common formats to which .NET have support for are .BMP, .EMF, .GIF, .ICO, .JPG, .PNG, .TIF and .WMF.

Entity Framework 4 Tips for WinForms Development

I've been recently working on a smart client (WinForms) application backed by Entitiy Framework 4 (EF4) on Visual Studio 2010. In this blog post I will try to give you some tips regarding some limitations and points to be careful about EF4.

How to backup SMS from windows mobile Pocket PC to computer

How to backup SMS from windows mobile Pocket PC to computer

Many Windows Mobile Pocket PC Phone users could not backup their SMS to txt file or view on computer. I found this software offers a SMS Messages backup solution to Backup all SMS messages for Windows Mobile Phones onto computer and keep them safe. Here is the user's guide:

How to transfer files between computer and mobile device using bluetooth

What is Bluetooth? How can I have it on my computer?

Bluetooth wireless technology is a communication technology that allows two devices to communicate wirelessly. Most of the notebooks are nowadays equipped with bluetooth. For those notebooks or computers that don't, you can use a bluetooth dongle to add the functionality and it just costs you around $5. Although higher price range bluetooth dongles are available but it makes no sense of buying them if you just plan to connect your mobile device to the computer. Look for one that has Bluetooth v2.0 + EDR (Enhance Data Rate) supporting speeds of upto 3Mbps and with Vista support. You can easily have one of that kind in just $5.

Setting up bluetooth to work on your computer

Just Insert the bluetooth dongle in the USB.
It should get detected by your Operating System and should be ready to use. In case it is just detected as a new hardware, you need to install drivers for it that came with your bluetooth dongle (You can try Google to find the drivers).
Once drivers are installed, a bluetooth notification icon will appear in your system tray.
Right Click on it to access Settings (This may vary with your bluetooth dongle).
Make sure you have turned Discovery On (It allow others to see your computer).
Switch On the bluetooth on the mobile device.

How to Acess VSS from a remote Computer


i acess vss from lan with no problems and now i want acess from a remote computer not in a Lan

I need access over the Internet

What are settings i need to set up in the server and my client machine

Can't get an Icon to show for Desktop shortcut and Program Menu



I've created a SetupWizard, but can't get it to show the Icon for the shortcut on desktop and program menu. The installation goes fine without any errors, the only problem is the icon.

I've made a shortcut of my exe file in the Application Folder and dragged the shortcut to the Desktop folder, then on the shortcut properties, I assigned it an icon picture located in Application Folder.

Any suggestions will be very much appreciated.


localhost is not set up to establish a connection on port 51624 with this computer


I'm trying to run asp.net locally, but getting the error

localhost is not set up to establish a connection on port 51624 with this computer

How can I fix it?

Access to report file denied. Another program may be using it.


Migrated from Windows 2000 ASP.NET 1.1 to Windows 2003, ASP.NET 2.0 and had this error. All the forums/MSDN/Blogs says to give Read/Write Access to C:\Windows\Temp folder. Why should we give Full Access to some folder in Production server?? In windows 2000, ASP.NET 2.0 development machine, no files are created when we run crystal reports from aspx pages. Then why in Windows 2003 servers, we need to give rights to temp folder?? It is a simple code


And the code is not storing anything on the disk. Then why should it store the GUID.rpt file in Temp file in Windows 2003 server?? Any alternative is there not to store anything on the disk when Crystal Reports are opened in aspx page??


Editor's Note: Does Your Program Smell Like Bacon?


When building your program, are you content with "good enough"? If so, your expectations are fatally low.

Keith Ward

MSDN Magazine August 2010

CLR Inside Out: Program Silverlight with the CoreCLR


The CoreCLR provides the perfect set of CLR classes and functionality for the Web.

Andrew Pardoe

MSDN Magazine August 2008

Virtual Server 2005: Program Customized Testing Environments Without Trashing Your Machine


Efficient testing can require many different machine and server configurations but the effort needed to manage these test environments can take a toll. Microsoft Virtual Server 2005 simplifies the provisioning and management of testing environments. This article demonstrates how the extensive Virtual Server COM API can be used to create an automated application testing environment to make your testing chores a whole lot easier.

Ben Waldron

MSDN Magazine August 2004

Design: Inspect and Optimize Your Program's Memory Usage with the .NET Profiler API


Developers using .NET often make memory leak tracking a low priority because the common language runtime takes care of garbage collection. What few developers realize, however, is that their objects' lifespans, along with their size and what other objects have been instantiated, all affect how they are cleaned up. Depending on the particular circumstances, these combinations can negatively affect performance, especially over the lifetime of an application. This article presents a way for developers to see memory usage and understand garbage collection using the .NET Profiler API. Along the way, a sample application to demonstrate these principles is built.

Jay Hilyard

MSDN Magazine January 2003

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend