Msi file on linux

Extracting msi files using Linux

Related: How to extract files from MSI package? To extract the contents of a MSI installer using Linux, I can either use msiexec with wine or use 7zip . However, the latter does not preserve directories and file names only in part. Is there any way to properly extract MSI files without having to use wine ? edit: to illustrate the issue with Microsoft’s Infer.NET, here is a list of files that 7zip produces and here one that msiexec produces (where the latter is what I want)

Thanks, I already read the article and it does not resolve the 7zip issues (neither in combination with e.g. cabextract). Jsmsix would still require wine because you can’t run Windows executables natively.

What I’d like to do is create a buildscript for Archlinux, for which a set up wine is quite a bulky dependency just to be able to install something that should depend solely on mono.

3 Answers 3

While it won’t help you immediately, lessmsi is working on a native Linux version. It preserves directory structure like you want, so it’s worth checking up on if this is going to be a long-term issue for you. Unfortunately, .msi support on Linux seems pretty sparse, so lessmsi or msiexec through wine might be your only immediate option, even if (as you said) wine is a pretty heavy dependency for extracting archives.

FYI: In the latest release of lessmsi I managed to move the cab extraction code over to libmspack which is a portable library that should run on linux too. So we did take a concrete step towards linux support recently. Soon I hope to use a portable msi lib, which will make everything portable.

-1. Linux version still does not exist after many years, and since question was is there any way to properly extract MSI files without having to use wine, this is not the answer. I have used instead msiextract from msitools package ( sudo apt install msitools in Ubuntu) as recommended in the answer by user2834.

There is no package found for 14.04 and building it also need lot of tools / libs and skills. Giving up

it’s in debian, and ubuntu willy: launchpad.net/ubuntu/+source/msitools. You can then simply call «msiextract file.msi» and that’s it, no more skills needed.

You can try software called cabextract — atleast Ubuntu has packages for it, I would expect it to be found from other popular distros as well.

Читайте также:  Permission denied linux 777

Thanks for the hint, but cabextract does not even partially conserve filenames and directories (so it performs worse than 7zip).

The MSI format is multiple layers: at the top level it’s a disk image, with data blocks scattered all around inside the .msi file. If you decode the disk image, it contains several files, including a .cab file, and database files. cabextract finds CAB file headers inside the .msi image, but as the full .cab file is not contiguous, it can’t extract it. 7zip can extract the disk image and then the CAB file, but it doesn’t know how to read the database files, which map the CAB file entries to their true installation paths, like lessmsi does.

Источник

Как в Wine запустить файл .bat и .msi

Вы можете запустить файл .bat разными способами:

Найдите файл .bat и запустите его двойным кликом.

И найдите в окне Проводника нужный вам файл.

wine explorer /ПУТЬ/ДО/ПАПКИ

чтобы сразу попасть в нужную папку.

Когда найдёте файл .bat, то дважды кликните на него.

Например, я хочу запустить файл «С ключом ADM.bat» из папки /mnt/disk_d/Share/Conses/ConsFed/, тогда я открываю эту папку командой

wine explorer /mnt/disk_d/Share/Conses/ConsFed/

И в открывшемся окне двойным кликом запускаю файл «С ключом ADM.bat».

3. Вы можете запустить файл .bat в командной строке, используя конструкцию вида:

wine start /ПУТЬ/ДО/ФАЙЛА.bat

Если вы используете путь до файла в Linux, то обязательно нужно указать опцию /unix. Например, я хочу таким образом запустить файл «With-ADM.bat» который находится в папке /mnt/disk_d/Share/Conses/ConsFed/, тогда команда следующая:

wine start /unix '/mnt/disk_d/Share/Conses/ConsFed/With-ADM.bat'

Как в Wine запустить файл .msi

Файлы MSI нельзя запускать напрямую; вам нужно использовать либо программу Wine msiexec, либо запуск Wine с терминала:

wine msiexec /i whatever.msi

Источник

linux extract msi

msi installer will temporarily extract the files into C:\Documents and Settings\\Local Settings\Temp, but those files are removed once the installer exits. The destination directory does not need to exist prior to running this command. I have a new favorite MSI extraction tool called LessMSIerables.

How do I view MSI contents?

Probably the most popular free archiving utility, 7-Zip is able to read and extract the contents of an MSI file. As it behaves just like any other readable archive, you can simply right click on the file and choose 7-Zip -> Open archive to open the MSI for viewing.

Can you convert an EXE to MSI?

Convert EXE to MSI using a free utility

MSI Wrapper allows to easily convert any .exe file into an MSI package, and also delivers premium features for software developers as part of its Pro offering.

How do I force MSI to install?

  1. Right click on Windows Start , choose Command Prompt (Admin)
  2. In the command prompt, input. msiexec /i “path\setup.msi“
  3. Press Enter to start the install process.

How do I run Windows installer on Linux?

  1. Install a tool, that help you install Windows directly from the hard drive: sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt update sudo apt install winusb.
  2. Install a tool for work with NTFS: sudo apt-get install ntfs-3g.
  3. Format partition in NTFS: sudo mkfs.ntfs /dev/sdxx.
Читайте также:  Linux get memory frequency

What is a MSI file extension?

MSI is a file extension that applies to database files used by the Microsoft Windows Installer (MSI). They contain information about an application divided into features and components, and every component may contain files, registry data, shortcuts, and so on.

How do I run an EXE file on Ubuntu?

  1. Open a terminal.
  2. Browse to the folder where the executable file is stored.
  3. Type the following command: for any . bin file: sudo chmod +x filename.bin. for any .run file: sudo chmod +x filename.run.
  4. When asked for, type the required password and press Enter.

How do I extract MSI drivers from surface?

  1. Download and Extract the .msi from Microsoft using a cmd like this: msiexec /a SurfacePro_Win10_161504_0. .
  2. Drill into the Drivers folder.
  3. Zip up each folder separately inside of the Drivers folder.

How do I convert an MSI file to EXE?

  1. 3 Answers. Loading when this answer was accepted… .
  2. Step1: Create a exec.bat file in the same folder of your msi file and copy your msiexec /i «path of msi file» /qn in it. .
  3. Step2: Compress msi and bat files to a 7z archive. .
  4. Step3: .
  5. Step4 (Optional): .
  6. Step5: .
  7. Step6:

How do I extract an MSI from an exe?

Run Windows Command Prompt (cmd) (in Windows 10: open the Start menu, type cmd and press Enter) and go to the folder where your EXE file is located. replace with the name of your .exe file and with the path to the folder where you want the . msi file to be extracted (for example C:\Folder).

5 of the Best Application Launchers for Linux

Launcher

10 Best Application Launchers for Linux DesktopsCerebro. Cerebro is so efficient it is tagged a productivity booster with a brain. . Synapse. Synaps.

Roomba and iRobot Genius Get Smarter to Provide Partnership

Roomba

Does Roomba get smarter over time?Does iRobot get smarter?Does Roomba memorize your house?Which Roomba has smart mapping?Does Roomba get smarter over .

How to Get Google Lens on Any Android Device or iPhone

Google

On your Android phone, open Lens.With your Google Assistant: Say «Ok Google.» At the bottom right, tap Google Lens .On some Android phones, like Pixel.

Fresh articles, interesting news and useful guides from the world of modern technologies. We know everything about computers and gadgets that you encounter every day

Источник

Is it possible to run a Windows .msi installer?

Is it possible to install a Windows program from an MSI installer so that the installed program can be run with the Wine program loader?

1 Answer 1

Open the terminal, change directories with cd to the location of the .msi file, and install the .msi file with a command of the form wine msiexec /i whatever-filename.msi .

According to the official WineHQ FAQ:

MSI files cannot be run directly, you need to use the msiexec program. msiexec is a tool for installing .msi packages. MSI files can be installed in Wine from the terminal like this:

wine msiexec /i whatever-filename.msi 
wine start whatever-filename.msi 

That will then run the MSI program the same as if you had double-clicked it in Windows.

The first command can be changed if necessary to suit the circumstances. For example:

WINEPREFIX=/path/to/wineprefix wine msiexec /i /path/to/filename.msi 

or using wine64 instead of wine:

WINEPREFIX=/path/to/wineprefix wine64 msiexec /i /path/to/filename.msi 

A WINE prefix is a folder that contains all of the WINE configurations as well as all of the Windows pieces that WINE uses for compatibility, including libraries and a registry.

Читайте также:  Кали линукс открытые порты

If you want to uninstall the same .msi file later on run wine msiexec /x whatever-filename.msi

Источник

what are the ways to open MSI files in linux?

Actually i was tried with other tools like nsis,7Zip but i was not able to open msi file with nsis. So is there any way to open msi file in Linux and to do some changes to that file.Please guide me regard this.

2 Answers 2

Looks like msitools should be able to help you.

I’ve been able to extract some MSI files with msiextract from that package.

I don’t think, it is easy possible, because MSI is a binary format similar as an .exe file. I am not aware of any library. But if you find a Unix library which can write streams in .exe files, you should do similar with MSI I think What is possible to convert MSI to XML (in Windows), edit in Unix and convert it back later (in Windows) to MSI.

thanks philim for your suggestion.the thing is i have a .msi file and i want to open this file and want to add some data.how can i do this in linux not in windows.

Yes, as I said: «Of course, you can do that in Linux: Use a Windows VM !! It may work probably also with WINE (a Windows subsystem).» Really: .msi is maybe one of the most Windows-only-special formats ever. You need special tools for that even in Windows itself. I don’t know a tool which could do that in Linux, and I don’t know someone, who would seriously think about writing one, because it makes no sense. I really tried to help.

I wrote down that tips, because, honestly, «want to add some data» is a sentence which suggests the assumption, that someone doesn’t know about the difficulties to do that even with the right tool under the «native» OS here. So I wrote about that difficulties. Normally, no professional setup developer «adds» some data to a given MSI. It is best to do fresh rebuilds or when modifying setups from other sources, to work with the socalled transforms or patches.

One more thing: Everybody can install a Windows OS as a VM under Linux for free for test for 30 days. If your wish of having a linux tool for editing windows stuff is simply «political», and the work itself is not so important, to do that, what’s necessary. ok..

Just one mor thing to prove I really try to dive into even uncommon questions: There exist converters to xml (msi2xml) and vice versa for download. You can convert msi to xml (in Windows) and then edit msi as long as you want in linux. Converting back to msi has to be done in Windows again of course.

Источник

Оцените статью
Adblock
detector