/build/static/layout/Breadcrumb_cap_w.png

Need help converting batch file process into existing MSI

Hello,

Newbie here needing some AdminStudio help. I’m not even sure where to get started.

I have a process that runs in a batch file that seeks out an IP address for a server. So after the current MSI installs, the below process runs to identify the IP and then places it in the registry. We’re moving this process to group policy and I need help understanding how to build/add this functionality into the existing msi. Or create a new one? Anyone have some ideas or directions?
[/align][/align]for /f "tokens=1-2" %%i in ('nslookup %computername% 192.168.xxx.xxx ^| findstr /N Address ^| findstr /V 192.168.xxx.xxx') do set IP=%%j

reg add "HKLM\Software\InterSect Alliance\AuditService\Config" /v ClientName /t REG_SZ /d %IP% /f
[/align] [/align]Thank you in advance… [/align]

0 Comments   [ + ] Show comments

Answers (3)

Posted by: aogilmor 15 years ago
9th Degree Black Belt
0
ORIGINAL: pumagaju
I have a process that runs in a batch file that seeks out an IP address for a server. So after the current MSI installs, the below process runs to identify the IP and then places it in the registry. We’re moving this process to group policy and I need help understanding how to build/add this functionality into the existing msi. Or create a new one? Anyone have some ideas or directions?
[/align][/align]for /f "tokens=1-2" %%i in ('nslookup %computername% 192.168.xxx.xxx ^| findstr /N Address ^| findstr /V 192.168.xxx.xxx') do set IP=%%j
reg add "HKLM\Software\InterSect Alliance\AuditService\Config" /v ClientName /t REG_SZ /d %IP% /f
[/align] [/align]Thank you in advance… [/align]


Well first of all I don't think you need %computername% as nslookup appears to return your name server for the local computer by default. You can probably use a type 2 custom action to run this util in your MSI and populate the IP value in the registry table.
Posted by: pumagaju 15 years ago
Senior Yellow Belt
0
You can probably use a type 2 custom action to run this util in your MSI and populate the IP value in the registry table.
So I have created this Type 2 Custom Action and it seems to work. I even get a return code value of 1. However, the CA is not completing as its not dropping the critical value into the registry.
If I run the EXE that the CA calls as a stand alone install the reg is updated as expected.

In the CA I have the following settings:
Location set to Store in a binary table;
In-Script Execution set at Deferred Execution;
Install Execute Sequence set to After InstallInitialize;
Install Execute Condition set to Not Installed;

Any ideas on troubleshooting this?

Thanks,
Posted by: pumagaju 15 years ago
Senior Yellow Belt
0
ORIGINAL: pumagaju

You can probably use a type 2 custom action to run this util in your MSI and populate the IP value in the registry table.
So I have created this Type 2 Custom Action and it seems to work. I even get a return code value of 1. However, the CA is not completing as its not dropping the critical value into the registry.
If I run the EXE that the CA calls as a stand alone install the reg is updated as expected.

In the CA I have the following settings:
Location set to Store in a binary table;
In-Script Execution set at Deferred Execution;
Install Execute Sequence set to After InstallInitialize;
Install Execute Condition set to Not Installed;

Any ideas on troubleshooting this?

Thanks,

I resolved my problem by changing the 'In-Script Execution' from Deferred Execution; to Commit Execution.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ