Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Getting 2203 error while doing silent installation of MSI

Getting 2203 error while doing silent installation of MSI

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorial
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vijay533
    wrote on last edited by
    #1

    Hi i am using following code for silent installation of MSI am getting 2203 error. This is the code i am using. Not working if i pass domain Administrator username and password, it is giving error like "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203". Can anyone tell me how to resolve this issue. Note: It is working fine if i pass the local/Built-in administrator username and password. UAC is enabled in the PC. strTempFolderToDownload = "msiexec /a "+ MSILocaltion + " ALLUSERS=0" + " TARGETDIR=" + '"' +Installlocation+ '"' + " /qb" bLogonRet = LogonUser(strUserName, strDomainName, strPassWord, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT , &hToken); if(bLogonRet && hToken!=NULL) { BOOL benvBlock = CreateEnvironmentBlock(&lpvEnv, hToken, TRUE); if(benvBlock) { dwSize = sizeof(szUserProfile)/sizeof(WCHAR); BOOL bUsrProDir = GetUserProfileDirectory(hToken, szUserProfile, &dwSize); if(bUsrProDir) { bCreateRet = CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, LOGON_WITH_PROFILE, NULL, CT2W(strTempFolderToDownload),CREATE_UNICODE_ENVIRONMENT, lpvEnv, szUserProfile, &si, &pi ); } } } As well as i tried only with following code also no luck. CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, LOGON_WITH_PROFILE, NULL, CT2W(strTempFolderToDownload),CREATE_UNICODE_ENVIRONMENT, NULL, NULL, &si, &pi ); CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, NULL, NULL, CT2W(strTempFolderToDownload),NULL, NULL, NULL, &si, &pi );

    L D 2 Replies Last reply
    0
    • V Vijay533

      Hi i am using following code for silent installation of MSI am getting 2203 error. This is the code i am using. Not working if i pass domain Administrator username and password, it is giving error like "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203". Can anyone tell me how to resolve this issue. Note: It is working fine if i pass the local/Built-in administrator username and password. UAC is enabled in the PC. strTempFolderToDownload = "msiexec /a "+ MSILocaltion + " ALLUSERS=0" + " TARGETDIR=" + '"' +Installlocation+ '"' + " /qb" bLogonRet = LogonUser(strUserName, strDomainName, strPassWord, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT , &hToken); if(bLogonRet && hToken!=NULL) { BOOL benvBlock = CreateEnvironmentBlock(&lpvEnv, hToken, TRUE); if(benvBlock) { dwSize = sizeof(szUserProfile)/sizeof(WCHAR); BOOL bUsrProDir = GetUserProfileDirectory(hToken, szUserProfile, &dwSize); if(bUsrProDir) { bCreateRet = CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, LOGON_WITH_PROFILE, NULL, CT2W(strTempFolderToDownload),CREATE_UNICODE_ENVIRONMENT, lpvEnv, szUserProfile, &si, &pi ); } } } As well as i tried only with following code also no luck. CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, LOGON_WITH_PROFILE, NULL, CT2W(strTempFolderToDownload),CREATE_UNICODE_ENVIRONMENT, NULL, NULL, &si, &pi ); CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, NULL, NULL, CT2W(strTempFolderToDownload),NULL, NULL, NULL, &si, &pi );

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See some of these suggestions: MSI am getting 2203 error - Google Search[^]

      1 Reply Last reply
      0
      • V Vijay533

        Hi i am using following code for silent installation of MSI am getting 2203 error. This is the code i am using. Not working if i pass domain Administrator username and password, it is giving error like "The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2203". Can anyone tell me how to resolve this issue. Note: It is working fine if i pass the local/Built-in administrator username and password. UAC is enabled in the PC. strTempFolderToDownload = "msiexec /a "+ MSILocaltion + " ALLUSERS=0" + " TARGETDIR=" + '"' +Installlocation+ '"' + " /qb" bLogonRet = LogonUser(strUserName, strDomainName, strPassWord, LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT , &hToken); if(bLogonRet && hToken!=NULL) { BOOL benvBlock = CreateEnvironmentBlock(&lpvEnv, hToken, TRUE); if(benvBlock) { dwSize = sizeof(szUserProfile)/sizeof(WCHAR); BOOL bUsrProDir = GetUserProfileDirectory(hToken, szUserProfile, &dwSize); if(bUsrProDir) { bCreateRet = CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, LOGON_WITH_PROFILE, NULL, CT2W(strTempFolderToDownload),CREATE_UNICODE_ENVIRONMENT, lpvEnv, szUserProfile, &si, &pi ); } } } As well as i tried only with following code also no luck. CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, LOGON_WITH_PROFILE, NULL, CT2W(strTempFolderToDownload),CREATE_UNICODE_ENVIRONMENT, NULL, NULL, &si, &pi ); CreateProcessWithLogonW(strUserName, strDomainName, strPassWord, NULL, NULL, CT2W(strTempFolderToDownload),NULL, NULL, NULL, &si, &pi );

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        2203 in an administrative install usually means "access denied". Where are you installing it to and is the account running the MSIEXEC command an administrator? Is the .MSI copied to the local machine before you launch it? Also, "ALLUSERS=0" isn't really a thing. The behavior of ALLUSERS isn't defined for a value of 0. The behavior is defined for values 1 and 2 and for an empty string (""). A value of 1 is for a "per-machine" install or "all users", which is typical if you're installing to Program Files. A value of 2 is for letting MSIEXEC determine which type of installation it should do, checking the value of the MSIINSTALLPERUSER property. See ALLUSERS property - Win32 apps | Microsoft Docs[^] for more.

        Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
        Dave Kreskowiak

        V 1 Reply Last reply
        0
        • D Dave Kreskowiak

          2203 in an administrative install usually means "access denied". Where are you installing it to and is the account running the MSIEXEC command an administrator? Is the .MSI copied to the local machine before you launch it? Also, "ALLUSERS=0" isn't really a thing. The behavior of ALLUSERS isn't defined for a value of 0. The behavior is defined for values 1 and 2 and for an empty string (""). A value of 1 is for a "per-machine" install or "all users", which is typical if you're installing to Program Files. A value of 2 is for letting MSIEXEC determine which type of installation it should do, checking the value of the MSIINSTALLPERUSER property. See ALLUSERS property - Win32 apps | Microsoft Docs[^] for more.

          Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
          Dave Kreskowiak

          V Offline
          V Offline
          Vijay533
          wrote on last edited by
          #4

          Hi Dave, Thanks for the posting. 1.) I am trying to install in C:\Program Files(x86)\ folder. 2.) I logged in as non admin user, am trying to install the MSI with domain Administrator credentials am using CreateProcessWithLogonW to do this. 3.) Yes, i copied the installer into temp location.

          D 1 Reply Last reply
          0
          • V Vijay533

            Hi Dave, Thanks for the posting. 1.) I am trying to install in C:\Program Files(x86)\ folder. 2.) I logged in as non admin user, am trying to install the MSI with domain Administrator credentials am using CreateProcessWithLogonW to do this. 3.) Yes, i copied the installer into temp location.

            D Offline
            D Offline
            Dave Kreskowiak
            wrote on last edited by
            #5

            OK. In that case, if the command line your code generated works if an admin on the machine runs it, the problem is going to be in your code that logs in as an admin, but apparently doesn't run anything as an admin. I couldn't tell you what the problem is there.

            Asking questions is a skill CodeProject Forum Guidelines Google: C# How to debug code Seriously, go read these articles.
            Dave Kreskowiak

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups