Spawing exe not inheriting permissions
I have an exe (test.exe) which is a 32 bit written in c++ (unicode charset). This exe will perform the restore operation. The steps include:
- check outlook installation and load msmapi32.dll
- create a subfolder in inbox of the specified user.
- importing eml file into the subfolder.
These operations are done using temporary u开发者_JAVA百科ser who has given full access permission.
This exe is executing fine. The issue is when I try to spawn this exe using C# Process.start(), it fails with [MAPI_E_FAILONEPROVIDER]
while calling "createstoreentryid".
Any suggestions please.
using (UNCAccessWithCredentials unc = new UNCAccessWithCredentials())
{
if (unc.NetUseWithCredentials(path,
userName,
domain,
passWord,textFile))
{
System.Diagnostics.Process.Start(path);
}
}
精彩评论