|
4 | 4 | <?define ProductVersion="$(env.CLI_VERSION)" ?> |
5 | 5 |
|
6 | 6 | <?define ProductName = "Sqlcmd Tools" ?> |
| 7 | + <?define AppName = "SqlCmd" ?> |
7 | 8 | <?define ProductDescription = "Command-line tools for Microsoft SQL Server." ?> |
8 | 9 | <?define ProductAuthor = "Microsoft Corporation" ?> |
9 | 10 | <?define ProductResources = ".\resources\" ?> |
|
29 | 30 | <Property Id="ARPHELPLINK" Value="https://docs.microsoft.com/sql/tools/sqlcmd-utility" /> |
30 | 31 | <Property Id="ARPURLINFOABOUT" Value="https://github.com/microsoft/go-sqlcmd" /> |
31 | 32 | <Property Id="ARPURLUPDATEINFO" Value="https://github.com/microsoft/go-sqlcmd" /> |
32 | | - <Property Id="ApplicationFolderName" Value="SqlCmd\Tools" /> |
33 | | - <Property Id="WixAppFolder" Value="WixPerMachineFolder" /> |
34 | 33 |
|
35 | 34 | <!-- User Interface --> |
36 | 35 | <WixVariable Id="WixUILicenseRtf" Value="$(var.ProductResources)CLI_LICENSE.rtf"/> |
|
42 | 41 |
|
43 | 42 | <Directory Id="TARGETDIR" Name="SourceDir"> |
44 | 43 | <Directory Id="ProgramFiles64Folder"> |
45 | | - <Directory Id="SQLCMDFOLDER" Name="SqlCmd"> |
46 | | - <Directory Id="SQLCMDTOOLSFOLDER" Name="Tools"> |
47 | | - </Directory> |
| 44 | + <Directory Id="SqlcmdDirectory" Name="$(var.AppName)"> |
| 45 | + <Component Id="sqlcmd.exe" Guid="2988854C-D02C-4D48-866C-8EAEBA6BC54B"> |
| 46 | + <CreateFolder /> |
| 47 | + <RemoveFolder Id="RemoveSqlCmdDirectory" On="uninstall" /> |
| 48 | + <RegistryKey Root="HKCU" Key="Software\Microsoft\SqlCmd"> |
| 49 | + <RegistryValue Name="MainExe" Value="1" KeyPath="yes" Type="integer" /> |
| 50 | + </RegistryKey> |
| 51 | + <File |
| 52 | + Id="sqlcmd.exe" |
| 53 | + Name="sqlcmd.exe" |
| 54 | + Source="$(env.PIPELINE_WORKSPACE)\SqlcmdWindowsAmd64\sqlcmd.exe" |
| 55 | + DiskId="1" |
| 56 | + Checksum="yes"/> |
| 57 | + <Environment |
| 58 | + Id="PATH" |
| 59 | + Name="PATH" |
| 60 | + Value="[SqlcmdDirectory]" |
| 61 | + Permanent="yes" |
| 62 | + Part="first" |
| 63 | + Action="set" |
| 64 | + System="yes" /> |
| 65 | + </Component> |
48 | 66 | </Directory> |
49 | 67 | </Directory> |
50 | 68 | </Directory> |
51 | | - |
52 | | - <DirectoryRef Id="SQLCMDTOOLSFOLDER"> |
53 | | - <Component Id="sqlcmd.exe" Guid="2988854C-D02C-4D48-866C-8EAEBA6BC54B"> |
54 | | - <File Id="sqlcmd.exe" Source="$(env.PIPELINE_WORKSPACE)\SqlcmdWindowsAmd64\sqlcmd.exe" KeyPath="yes" Checksum="yes"/> |
55 | | - <Environment |
56 | | - Id="PATH" |
57 | | - Name="PATH" |
58 | | - Value="[SQLCMDTOOLSFOLDER]" |
59 | | - Permanent="yes" |
60 | | - Part="last" |
61 | | - Action="set" |
62 | | - System="yes" /> |
63 | | - </Component> |
64 | | - </DirectoryRef> |
65 | | - |
66 | 69 | <Feature Id="ProductFeature" |
67 | 70 | Title="SqlCmd Tools" |
68 | 71 | Level="1" |
|
0 commit comments