This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Add registry key to package?

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

  • 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.

  • Thanks LGarvin.  I will give that a try today.

  • 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

  • Fixed it.  It was my syntax.  Resolved as follows:

    Add reg.exe and <filename>.reg to package

    In the Package Boot Manager add a post package Run Program of reg.exe with a command line of Import <filename>.reg

  • Just an additional point.. REG.EXE is already on the target system, there's no need to include REG.EXE in the package, just path it appropriately in the Run Program statement.