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]
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)
Please log in to answer
Posted by:
aogilmor
15 years ago
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
[/align] [/align]Thank you in advance… [/align]
reg add "HKLM\Software\InterSect Alliance\AuditService\Config" /v ClientName /t REG_SZ /d %IP% /f
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
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
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.
so that the conversation will remain readable.