Jump to content

What is the reverse of the "expand" command in XP?


Mike89

Recommended Posts

I know how to use the expand command in XP to turn a single ".xm_" file to ".xml". I want to know how to reverse that, to turn a ".xml" file back to the compressed ".xm_". I'm talking about just a single file, not batching or anything.

Purpose example; taking the "nvapps.xm_" out of the Nvidia drivers folder (after I unzipped the driver exe), expanding it to "nvapps.xml" so I can open and edit it, pack it back up to the original "nvapps.xm_" and put it back into the drivers folder so the drivers install with the edited nvapps.xml file. This particular file holds all the Nvidia game profiles. Usually I install the drivers and then edit the .xml file to get rid of profiles I don't use. I want to be able to do that before I install the drivers.

Edited by Mike89
Link to comment
Share on other sites


I need some clarification on using that. I went to the system32 folder, found it, and now don't know what to do with it. Clicking on it does nothing.

Edited by Mike89
Link to comment
Share on other sites

use it from a CMD window.

C:\WINDOWS\system32>makecab /?

Microsoft ® Cabinet Maker - Version 5.1.2600.5512

Copyright © Microsoft Corporation. All rights reserved..

MAKECAB [/V[n]] [/D var=value ...] [/L dir] source [destination]

MAKECAB [/V[n]] [/D var=value ...] /F directive_file [...]

source File to compress.

destination File name to give compressed file. If omitted, the

last character of the source file name is replaced

with an underscore (_) and used as the destination.

/F directives A file with MakeCAB directives (may be repeated).

/D var=value Defines variable with specified value.

/L dir Location to place destination (default is current directory).

/V[n] Verbosity level (1..3).

In the simplest form:

makecab myfile.dll

Link to comment
Share on other sites

Can you break this down into "dumbass" language (if you already did, I'm screwed, heh heh)? I'm looking at what you got there and am confused.

Lets say I put the "nvapps.xml" into the "C:\" folder. Now I want to change it right there in C:\ to "nvapps.xm_".

Edited by Mike89
Link to comment
Share on other sites

OK, this is what I've done so far.

Put the "nvapps.xml" file in C:\

Opened Command Prompt.

changed directory to "c:\windows\system32".

Typed in, "makecab c:\nvapps.xml c:\nvapps.xm_"

It worked, sort of. The "nvapps.xm_" file is now beside the "nvapps.xml" file in c:\.

Problem is the size of this new "nvapps.xm_" file is now 18.8kb. The original "nvapps.xm_" (that was previously expanded) is 41.1kb. So something didn't come out right. It's like it compressed it more than it was originally compressed.

Edited by Mike89
Link to comment
Share on other sites

No need to change to the system32 directory. And your complaining about getting better compression? nVidia may have used something else to compress it or who knows.

All you should have to do is go to the folder that contains the file you want to recompress and enter:

makecab filename.ext

makecab is in the system path being in the system32 directory so windows will find it. After running the command above you will end up with filename.ex_ in the same folder you ran the command from.

Link to comment
Share on other sites

I wouldn't necessarily have a problem with the different compression if the end result worked but it doesn't. I can expand that .xm_ file to .xml. I can then makecab it back to .xm_, then back again and it is still readable and back to the same size the unpacked .xml was. That was not the result when I put that .xm_ back into the Nvidia drivers folder and then tried to install the drivers. The drivers did install but when I went back into the system32 folder to view the now expanded .xml file, it was unreadable (opened but it was a bunch of jibberish) and it was also not the same size. So it seems that whatever method Nvidia is using to expand when installing drivers needs the same compression or something. As I said, taking that .xm_ file, expanding it to .xml, then makecab back to .xm_, the file then becomes about 1/5th the size it was to begin with. Somehow this is screwing up the drivers install process and it's not installing that file properly (neither in size or readability). Weird deal.

Edited by Mike89
Link to comment
Share on other sites

The link for nvidia drivers is Nvidia.com.

As far as me editing that .xml file. Yes I did edit it but that's not it. I can take that edited .xml, makecab it back to .xm_, expand it back to .xml and it will still be exactly as it was, same size, and readable. If I take that same edited .xml, makecab it to .xm_ and put that back into the drivers folder and then install the drivers, it's different. When the drivers install that edited .xml, it is now unreadable and a different size from the original edited .xml.

Editing it makes no difference. If I didn't edit it, the outcome is the same. The original .xm_ in the drivers folder is a certain size. If I take that file out of the drivers folder, expand it (via windows expand command) to .xml, then makecab it back to .xm_ (with no changes), the resulting .xm_ is now 1/5th the size of what it was. If I put that file back into the drivers folder and then install the drivers, that's when the installed .xml file is unreadable and a different size (way smaller) from the original installed .xml. Somehow in the process of Nvidia's method of extracting those driver files, because that one file is compressed differently than it was to begin with, it doesn't fully expand it properly.

Link to comment
Share on other sites

OK, I think I've made some headway. On another forum someone posted a link to a Microsoft Tool Kit that had a program called "Compress.exe". I installed the toolkit. Compress.exe works similar to "makecab" using the command prompt.

I tried the same exercise. I expanded a .xm_ to .xml. I then used Compress.exe to repack it back to .xm_. Now looking at the size, it's exactly the same size as the original .xm_ instead of being 1/5th the size as makecab did it. Hopefully now when I edit it, repack it and put it back in the driver folder, it will install right this time. I'm going to give it a go to see what happens.

Link to comment
Share on other sites

Ok, tried the driver install again doing the things I did using "compress.exe" instead of "makecab" and it installed that file perfectly this time. However "compress" is repacking that ".xml" to ".xm_", differently than the way "makecab" does it makes the difference in this case.

If anyone is interested in the compress program, it's here.

http://www.microsoft.com/downloads/details...;displaylang=en

Edited by Mike89
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...