[Sample Of May 2nd] Create low-integrity process


Homepage image
RSS Feed

Sample Download :

CS Version: http://code.msdn.microsoft.com/CSCreateLowIntegrityProcess-d7cb5e4d

VB Version: http://code.msdn.microsoft.com/VBCreateLowIntegrityProcess-4df197cc

Cpp Version: http://code.msdn.microsoft.com/CppCreateLowIntegrityProces-8dd7731d


The code sample demonstrates how to start a low-integrity process. The application launches itself at the low integrity level when you click the "Launch myself at low integrity level" button on the application. Low integrity processes can only write to low integrity locations, such as the %USERPROFILE%\AppData\LocalLow folder or the HKEY_CURRENT_USER\Software\AppDataLow key. If you attempt to gain write access to objects at a higher integrity levels, you will get an access denied error even though the user's SID is granted write access in the discretionary access control list (DACL).

By default, child processes inherit the integrity level of their parent process. To start a low-integrity process, you must start a new child processwith a low-integrity access token by using CreateProcessAsUser. Please refer to the CreateLowIntegrityProcess sample function for details.


You can find more code samples that demonstrate the most typical programming scenarios by using Microsoft All-In-One Code Framework Sample Browser or Sample Browser Visual Studio extension. They give you the flexibility to search samples, download samples on demand, manage the downloaded samples in a centralized place, and automatically be notified about sample updates. If it is the first time that you hear about Microsoft All-In-One Code Framework, please watch the introduction video on Microsoft Showcase, or read the introduction on our homepage http://1code.codeplex.com/.

Comments (0)

Skip to main content