Someone has set up read/write permissions for a reason.
They aren't there for you to simply change because it is inconvenient for your program.
The correct thing to do is to make sure that files you need access to are stored in a location which all users of your program DO have access to.
On a corporate network, that is commonly a network drive, mapped to a drive letter such as G: or X: or similar.
In fact, surely that must be easier for you than digging around in API code and trying to circumvent the security?
Alternatively, why not get the users to run your program with administrator credentials? (Right click, choose Run As... and enter the correct details.)
That way, the security exists unchanged, but your program can do what it needs to do.
Enter your message below
Sign in or Join us (it's free).