Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Installing via batch file

We need to import a .reg file before we run installation .msi file.

We have the batch file looks like this(Installer file) :

regedit.exe /s \\servername\folder\registry.reg

\\servername\folder\install.msi /norestart

 

Include Entire Directory is checked.

It seems like the registry file is not importing.

I noticed there is a command line section in installer package tab.. Is there any way we can  push this installation different ways?

Perhaps instead .bat file, Installer file will be .msi and for the command line will be regedit.exe /s \\servername\folder\registry.reg

 

Any ideas ?

Thanks.

 

 

 

 

 

0

Comments

4 comments
Date Votes
  • Hi Adam,

    I am going to move this question to the PDQ Deploy forum instead of the Inventory forum.

    The command line that you see displays the command that will be executed on the target systems. Using PDQ Deploy in Free mode limits you to one action per installer. If you need to perform more than action and you are using Free mode then the best thing is to group your actions, as you have done, into a script like .bat or .vbs. If you run PDQ Deploy in Pro Mode then you can define multiple actions without resorting to using a script. For instance your first action could be importing a reg file and the second action could be running the MSI.

    Just to be clear, are you saying that the reg file is not getting imported but the MSI is getting installed?

    0
  • That is correct.

    We want to import some "HKLM\Software"  settings before the .msi

    We run this with domain admin user credential.

    0
  • I am unable to duplicate the problem. I have a reg file located on a file server. I use a batch file to run regedit.exe /s and call the .reg file. So far it imports without issue.

    One thing you may want to try... You mentioned that you have the "Include entire directory" checked on your Installer, which is great however your batch file still calls the reg file on the server. If the reg file is in the same directory as the batch file then it is getting copied down to the target during the deployment and there is no need to import the reg file from the server. The same thing goes for the MSI file. 

    Here are the contents of my simple batch file. I import a reg file which places a registry key under HKEY_LOCAL_MACHINE\Software. After the import I install Adobe Flash Player 11.

    regedit /s TestImp.reg
    msiexec /i "install_flash_player_11_active_x_32bit.msi" ALLUSERS=1 /q /norestart

    Here is a screenshot of my installer

    TestImport.png

    When you select the "Include entire directory" that means that all files and sub-directories that are with the Install File (RunMe.bat) will be copied down to the Windows\PDQDeployRunner\1\exec directory on each target. After the deployment is finished the 1\exec directories will be deleted. 

    0
  • This worked.

    Thank you very much  for your help.

    0