Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a folder which is created by administrator for which standard user dont have permission to create a file in that folder. but when i try to run a function with the help of C++ it should allow me to create a file. Can some body help me to how to do this with the help of C++ code.

Thanks,
Nagaraj B R
Posted

1 solution

Have a look at the CreateProcessAsUser function [^]

A good google search to use to find other solutions is "c++ run process as administrator" - as there are a variety of ways this could be achieved.

To get around this at our site we set up shares on network servers with restricted permissions where the user can create a file but cannot subsequently change or delete it
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900