Hi Simon,
You could just look for the path directly from the SQL Server Registry location:
Code: Select all
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\100\Tools\ClientSetup\path
Please note, this path is not the same for each SQL Server.
To achieve this with AdvancedInstaller go to
Search Page and add a New Search and name it for example SQLCMD. Right-click on the search and select "Add Location -> Registry" and specify the registry key.
Also, use the "Test Search" toolbar button in order to make sure the Search is configured correctly.
In the
Custom Actions page, create a new
"Launch EXE with working directory" Custom Action with the following parameters:
Working Dir: (any)
Full Path: "[SQLCMD]" and your command line parameters
Execution Condition: (Not Installed) AND SQLCMD
Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/