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.
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....
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 :-)
It is one time approach which doesn't need any changes to file properties or the enviornment variable "PATH".
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.
Hello again Ruchit,
I made the first attempt. You can check it out here:
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:
So perhaps I should post any updates also here
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.
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...
P.S. - just tested on Windows 7 - it works!