SQL Server – Extract files from extractable exe

Background

Upon mounting our MS SQL Server 2014 ISO File ended up with a screen that looks like this…

Image

isomounted

Tabulated

Bitness Filename
x64 SQLServer2014SP1-KB3058865-x64-ENU.exe
 x32 SQLServer2014SP1-KB3058865-x86-ENU.exe

 

 

Need

Needing to do a manual install, I know I need to extract the exe file.

 

Extract

7-Zip

My go to compress file extractor is 7-Zip.

Guide to Arguments

Argument Meaning Link
 -x Extract with full path Link
 -r Recurse Link
 -aos  Skip extracting of existing files Link 

 

 

Script



set "_compressedFile=SQLServer2014SP1-KB3058865-x64-ENU.exe "
set "_target=%cd%\extract"
set "_app7Zip=Z:\Program Files\7-Zip\7z.exe"

if not exist %_target% mkdir "%_target%"

rem x (Extract with full paths) command
rem Extracts files from an archive with their full paths in the current directory, or in an output directory if specified.
rem https://sevenzip.osdn.jp/chm/cmdline/commands/extract_full.htm

rem -r (Recurse subdirectories) switch
rem -r
rem https://sevenzip.osdn.jp/chm/cmdline/switches/recurse.htm

rem -aos Skip extracting of existing files.
rem https://sevenzip.osdn.jp/chm/cmdline/switches/overwrite.htm

"%_app7Zip%" x -r -aos %_compressedFile% -o%_target% *.* 

 

 

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s