Click here to Skip to main content
15,891,184 members
Articles / Programming Languages / C#

How to Take ownership of Program Files in windows 7

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
3 Oct 2012CPOL 0  
[Answering a different question asked in comments: how to run a console application with the console hidden:]This is simple:System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo(); startInfo.FileName = application; // I refer to the code I've shown...

Alternatives

Members may post updates or alternatives to this current article in order to show different approaches or add new features.

Please Sign up or sign in to vote.
3 Oct 2012pradeep rasara 3 alternatives  
I am using this code to take ownership of "C:\Program Files (x86)\Windows Sidebar\sidebar.exe" this file but it does not work I am running this code as Run as Administrator. while i go through command promptand write the command like: takeown /f "C:\Program Files (x86)\Windows...
Please Sign up or sign in to vote.
3 Oct 2012Rockstar_
Hi friend, this may help you, go through once...http://victorhurdugaci.com/using-uac-with-c-part-1/[^]
Please Sign up or sign in to vote.
3 Oct 2012Sergey Alexandrovich Kryukov
You made couple of bugs here.The problem with invalid "Files" here is simply related to the blank space in "Program Files". You should enclose the file name in this directory in "". But don't do it, just yet, first fix another bug (but both problems are good to understand).The second bug...

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect
United States United States
Physics, physical and quantum optics, mathematics, computer science, control systems for manufacturing, diagnostics, testing, and research, theory of music, musical instruments… Contact me: https://www.SAKryukov.org

Comments and Discussions