This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Best way to check if SQLCMD is present on target machine?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Aug 25, 2013
03:48 PM
Best way to check if SQLCMD is present on target machine?
Just as the title says, I'm looking for a best way for installation to check if sqlcmd is present on target machine. If not, it should be installed. I thought about several solutions, but they all have flaws. Here's my thoughts about this, in hope someone could provide a piece of advice what is best to do:
To create a specific prerequisite for SQLCMD (from command-line utilities microsoft provides, for example), we need to check if sqlcmd utility present in target machine. Unfortunately, every next version of SQL has different folder/registry path for Binn/Tools, which contains this utility. But installshield "prerequisite conditions" dialog seems to be not flexible enough in that case.
Second way would be to simply check for latest version of Command-line utilities and force user to install them if not. Looks simple, but not really considerate, is this really the only way?
Maybe, someone have met this problem before and could help with advice.
To create a specific prerequisite for SQLCMD (from command-line utilities microsoft provides, for example), we need to check if sqlcmd utility present in target machine. Unfortunately, every next version of SQL has different folder/registry path for Binn/Tools, which contains this utility. But installshield "prerequisite conditions" dialog seems to be not flexible enough in that case.
Second way would be to simply check for latest version of Command-line utilities and force user to install them if not. Looks simple, but not really considerate, is this really the only way?
Maybe, someone have met this problem before and could help with advice.
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 28, 2016
04:46 PM
SQLCMD /?
If error code returned is 0 SQLCMD is present. If not, it is not installed.
If error code returned is 0 SQLCMD is present. If not, it is not installed.