/bundles/itninjaweb/img/Breadcrumb_cap_w.png
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   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

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.
Answered 01/20/2009 by: aogilmor
Ninth Degree Black Belt

Please log in to comment
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,
Answered 01/22/2009 by: pumagaju
Senior Yellow Belt

Please log in to comment
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.
Answered 01/26/2009 by: pumagaju
Senior Yellow Belt

Please log in to comment