I would like to add a registry to HKLM/Software/WOW6432Node so that it should like as follows
MySoftware
Database
and the registry name and data should be Connectionstring and some value
I want to achieve this using command line
Code: Select all
/NewReg { [-RegKey <registry_key>] | [-RegValue <registry_value_name>] }
[-Data <registry_data>] [-64bit]
Code: Select all
$RegistryParams = "/edit $aippath /NewReg -RegKey HKLM\Software\MyAPP\MYREG -data tesdata"Code: Select all
.\advancedinstaller.com /edit "C:\Program Files (x86)\Caphyon\Advanced Installer 14.0.2\bin\x86\aip.aip" /newreg -regkey HKLM\Software\MyAPP\MYREG -data tesdata
Code: Select all
$InstallerName = "Installer1.2.10"
$SourceDir = "D:\AdvanceInstaller"
$AdvanceInstallerPath = Get-ChildItem "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | ForEach-Object {Get-ItemProperty $_.PSPath} | Where-Object {$_.DisplayName -match "Advanced Installer"}
$InstallerPath= "$($AdvanceInstallerPath.InstallLocation)bin\x86\AdvancedInstaller.com"
$aippath = "$SourceDir\$($InstallerName).aip"
$ProductName = "MyApplication"
$ProductParams = "/edit $aippath /SetProperty ProductName=$ProductName"
$repository = "/edit $aippath /SetAppdir -buildname DefaultBuild -path C:\MyApplication"
$newParameters = "/newproject $aippath -type enterprise"
$buildParams = "/build $aippath"
Start-Process -FilePath $InstallerPath -ArgumentList $newParameters -Wait -WindowStyle Hidden -ErrorAction Stop
Start-Process -FilePath $InstallerPath -ArgumentList $ProductParams -Wait -WindowStyle Hidden -ErrorAction Stop
Start-Process -FilePath $InstallerPath -ArgumentList $repository -Wait -WindowStyle Hidden -ErrorAction Stop
#Start-Process -FilePath $InstallerPath -ArgumentList $registryParams -Wait -WindowStyle Hidden -ErrorAction Stop
$registryParams ="/edit $aippath /NewReg -regkey HKLM\Software\MyApplication -data tesdata"
Start-Process -FilePath $InstallerPath -ArgumentList $registryParams -Wait -WindowStyle Hidden -ErrorAction Stop
Start-Process -FilePath $InstallerPath -ArgumentList $buildParams -Wait -WindowStyle Hidden -ErrorAction StopCode: Select all
$InstallerName = "Installer1.2.10"
$SourceDir = "D:\AdvanceInstaller"
$AdvanceInstallerPath = Get-ChildItem "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall" | ForEach-Object {Get-ItemProperty $_.PSPath} | Where-Object {$_.DisplayName -match "Advanced Installer"}
$InstallerPath= "$($AdvanceInstallerPath.InstallLocation)bin\x86\AdvancedInstaller.com"
$aippath = "$SourceDir\$($InstallerName).aip"
$ProductName = "MyApplication"
$DeleteReg = "/edit $aippath /DelReg -regkey HKUD\Software\[Manufacturer]"
Start-Process -FilePath $InstallerPath -ArgumentList $DeleteReg -Wait -WindowStyle Hidden -ErrorAction Stop
$registryParams = "/edit $aippath /NewReg -RegKey HKUD\Software\MyApplication -data ''"
$registryParams1 = "/edit $aippath /NewReg -RegValue HKUD\Software\MyApplication\path -data C:\MyApplication"
Start-Process -FilePath $InstallerPath -ArgumentList $registryParams -Wait -WindowStyle Hidden -ErrorAction Stop
Start-Process -FilePath $InstallerPath -ArgumentList $registryParams1 -Wait -WindowStyle Hidden -ErrorAction StopYou could set the "Manufacturer" property using the following command line:Also how can I set Company name from command line?
Code: Select all
AdvancedInstaller.com /edit "C:\Users\Sorin\Desktop\Work\Forum\Dorababu\Adding Registry from command line\Your Application.aip" /setproperty Manufacturer="aaa"
I'm glad that you've figured it out.After all I got this code
FOLLOW US
Get the latest news in Application Packaging