开发者

Spawing exe not inheriting permissions

开发者 https://www.devze.com 2023-04-05 14:06 出处:网络
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:

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:

  1. check outlook installation and load msmapi32.dll
  2. create a subfolder in inbox of the specified user.
  3. 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);
            }

        }
0

精彩评论

暂无评论...
验证码 换一张
取 消