5 Replies Latest reply on Jan 29, 2013 9:04 AM by Lawrence Garvin

    Add registry key to package?

    ascoyne

      Is it possible to add a registry key to a package as a post installation task?  I have tried adding a .reg file, but it doesn't work.

       

      Any help greatly appreciated

        • Re: Add registry key to package?
          Lawrence Garvin

          Definitely. You need to define the REG file as an Additional Included File in the package definition, and then call REG IMPORT or REG MERGE using that *reg file in the PostExecution step.

          • Re: Add registry key to package?
            ascoyne

            I have tried it as follows, but without success:

             

            Add a post package file - Run Program - Reg.exe Import WordQ.reg

             

            I have placed the reg.exe file and WordQ.reg file in the package.

             

             

            Below is an extract from the error logging file.  I think I have just not used the correct syntax.

             

            ogramobject::execute(exe) called for program name: C:\WINDOWS\SoftwareDistribution\Download\Install\Reg.exe Import WordQ.Reg
            2013/01/29 11:13:58:259 PID: 3944 TID: 472 installer::runexepackage called for path: C:\WINDOWS\SoftwareDistribution\Download\Install\Reg.exe Import WordQ.Reg with command line: .
            2013/01/29 11:13:58:259 PID: 3944 TID: 472 installer::runexepackage CreateProcess called with fqcommandline: "C:\WINDOWS\SoftwareDistribution\Download\Install\Reg.exe Import WordQ.Reg" .
            2013/01/29 11:13:58:259 PID: 3944 TID: 472 installer::runexepackage() failed with pathtoexe with command line ("C:\WINDOWS\SoftwareDistribution\Download\Install\Reg.exe Import WordQ.Reg" ). Error Code: 2
            2013/01/29 11:13:58:275 PID: 3944 TID: 472 programobject::execute(exe) completed for program name: C:\WINDOWS\SoftwareDistribution\Download\Install\Reg.exe Import WordQ.Reg and process exit code was: 0x2
            2013/01/29 11:13:58:275 PID: 3944 TID: 472 ewException caught: Failed to execute process File: ExecutionEngine.cppLine: 1184
            stack trace :


            2013/01/29 11:13:58:275 PID: 3944 TID: 472 executionengine::executeinstructions() runpostexecute() return code: 0x2 and will not continue