cancel
Showing results for 
Search instead for 
Did you mean: 

Easier way to extract .SAR and .CAR files with SAPCAR under Windows

ILIAN_Grigorov
Contributor
0 Kudos

Hi All

http://fireswordblog.blogspot.com/2012/03/easier-way-to-extract-sar-and-car-files.html

We all know that there is no GUI for SAPCAR so far.

It would be a lot easier if there was a DDL library or so, to write a program GUI.

Anyway

I found out some people made this thing working with manipulating the registry.

Well it is OK, but I found a easy & better solution for me:

1. Get SAPCAR.EXE and put it in c:\windows\system32  (or any other folder that persists in the default windows paths)

2. In the same folder make a file SAPCAR_e.BAT with the following contents:

SAPCAR.EXE -xvf %~sf1

3. You are ready, all you have to do is make CAR and SAR files open by SAPCAR_e.BAT.

Right click on such a file and set that in the Properties window.

Result: Now when you double click a SAR/CAR file it will extract in the same folder

Advantage: If you want to upgrade SAPCAR all you have to do is replace the SAPCAR.EXE in c:\windows\system32

Today I made this post in my blog.

Does anyone know a better, comfortable way to do that. Is there any GUI for SAPCAR.EXE.

Just wanted to share some thoughts....

Thanks

Accepted Solutions (0)

Answers (3)

Answers (3)

sun197895
Participant
0 Kudos

Though it an old post, I am confident you/someone will respond to my problem. I have done exactly the same way you mentioned in your steps. But I am not able to find the place where these files got uncompressed.

Means, I have copied the .exe file to System32 folder, then created a BAT file in the same System32 folder as suggested by you. Now when I tried to open the SAR file which is in my D drvie, I got pop-up asking me which application to use to open SAR file...I have mentioned the .BAT file which I created in System32 folder. Now a CMD black window opens and I can see the files getting extracted in the black window but after it gets closed I cannot find the place where they got extracted.

Please help.

ILIAN_Grigorov
Contributor
0 Kudos

Hello Sun 197895,

I am not sure what caused this problem. Obviously the working directory of the SAPCAR is not the same as where the .SAR archive is situated. My only suggestions is - if you set sapcar.exe or sapcar_e.bat to work always with administrative privilege...

To be honest with you, I did not test this with Windows 7 or 8. XP only!

I will try these days, but no problems have been reported so far...

Regards

P.S. - just tested on Windows 7 - it works!

Former Member
0 Kudos

Hi

Why I hit below error when using SAPCAR...?

"Program too big to fit in memory"

My notebook is running WinXP 32bit SP3 with 2GB RAM

ILIAN_Grigorov
Contributor
0 Kudos

Hi,

I can think only for 2 reasons for that:

1. You downloaded a 64bit SAPCAR, instead of 32bit

2. There was an error while downloading. Try to download it again.

Is it good to have the latest version

Regards

Former Member
0 Kudos

Hello Ilian,

A pretty decent approach. Unfortunately there is no GUI as such for SAPCAR.

However there is an issue with this approach if the concerned owner is not the administrator. In that case he won't be able to place the file in system32 most likely.In that case SAPCAR can probably be placed else and the *.bat script be modified.

I sometimes use an alternative approach. Not sure if more convinient than this approach. Place SAPCAR at a particular location and add that to environment variable "PATH" under user variable (even a non-admin can do it).

Then everytime you have to uncar you can change to the path (in command prompt) where the *SAR files are placed and issue SAPCAR -xvf *SAR.

Another better approach that I have thought of based on the idea given by you is that we can  have a permanent folder for storing our *SAR files. Suppose the folder is named E:\CAR (an example) In this folder place SAPCAR.exe and a bat script for uncaring the files. The bat script should be like this:

. Then the command in the script should be like

E:\CAR\sapcar -xvf  *SAR -R DUMP.

Here DUMP is the target folder within E:\CAR i.e E:\CAR\DUMP

E:\CAR will have you *bat script, sapcar binary as well as the *SAR files to be extracted.

The extracted files would be present in DUMP folder. I think you can play around with the bat script and make it more presentable. You can use VB code if you want some sort of GUI and then possibly can add the path of the *bat script to PATH variable or can place it in your shortcuts.

May be I will try to write a VB code for a very simple GUI that just asks for the PATH of f*SAR files and then does the rest of the work for you 🙂

Regards.

Ruchit.

It is one time approach which doesn't need any changes to file properties or the enviornment variable "PATH".

Regards.

Ruchit.

ILIAN_Grigorov
Contributor
0 Kudos

Hi Ruchit,

10x for the reply. I had an idea of writing a whole GUI in VB. It will read somehow the return of SAPCAR command. The problem is - VB .exe files are small and connected with standard DLLs which may be missing on some PCs. I could try DELPHI - but I am afraid I am not good enough

Anyway, the .BAT method works for me very well, and as you have propossed, if the user has no admin rights on the PC, he/she can make his/her own folder and include it in the PATH variable.

I will do some more work in this area, and will share again.

Regards

ilian

ILIAN_Grigorov
Contributor
0 Kudos

Hello again Ruchit,


I made the first attempt. You can check it out here:

http://scn.sap.com/blogs/firesword/2012/04/18/sapcar-gui

Regards

ILIAN

former_member228464
Participant
0 Kudos

Hi Ilian,

The tool is working fine and awesome...

Continue to provide more tools and other contributions....

Thanks a lot

Regards

Saman

ILIAN_Grigorov
Contributor
0 Kudos

Thanks Saman,

Next I will create the ability to extract all SAR archives in a folder with a single touch. The bad news is - I don't have enough time to work on the project.

As I can see this forum thread is more visited than my two blog posts:

http://scn.sap.com/blogs/firesword/2012/04/18/sapcar-gui

http://scn.sap.com/blogs/firesword/2012/04/12/easier-way-to-extract-sar-and-car-files-with-sapcar-un...

So perhaps I should post any updates also here

Cheers

Ilian