You are here

Making SimpleFileShredder 3.2 Portable

5 posts / 0 new
Last post
vamp1r
Offline
Last seen: 16 years 10 months ago
Joined: 2006-10-11 15:06
Making SimpleFileShredder 3.2 Portable

Here is a quick and easy method for anyone interested in making Simple File Shredder portable.

1. Head over to scar5 and download sfs v3.2 (http://www.scar5.com/index.htm)

2. Head over to legroom.net and download universal extractor (http://www.legroom.net/modules.php?op=modload&name=Open_Source&file=inde...)

3. Use Universal Extractor to extract the contents of sfs_setup.exe

4. From the extraction take simplefleshrd.exe (/), regsvr32.exe (/$SYSDIR), and secdel.dll (/$SYSDIR) and place them in a seperate folder called "Simple File Shredder Portable" (or whatever really)

5. Place a file in the "Simple File Shredder Portable" folder called launch_sfs.bat that reads:
regsvr32 /s secdel.dll
simplefleshrd
regsvr32 /s /u secdel.dll

Done. SFS must always be launched from the batch file otherwise it won't work. I would just offer the final product for download, but i'm unsure of SFS' licenses and distribution policies.

Also please note a file is still created in C:\Documents and Settings\(USERNAME)\Application Data\scar5\sfs called admin.dat (for me at least). I believe this is profile data that is created when the program is closed, but i'm not sure about this.

- Kyle

Sonicbomb77
Offline
Last seen: 17 years 5 months ago
Joined: 2006-11-06 00:03
it works fine

it worked fine, as for the document and settings directory .dat file it made, it made me one in the same directory as yours, but mine was a config.dat file. I don't know much about programming these things as im rly new here, but im sure someone here could make it delete this file after the app shuts down, or maybe create the .dat file in the same directory as the app. Just some of my ideas, but im still noobish to this whole thing so i prolly just stated the obvious >.

a wise man once said "Never spit into the wind." XD

vamp1r
Offline
Last seen: 16 years 10 months ago
Joined: 2006-10-11 15:06
I'm pretty sure that file

I'm pretty sure that file stores custom settings, as well as your password if you choose to password protect the program. Making it just delete the folder and contents after running would be easy. Carrying the settings around is a little trickier. I'm sure someone who knows NSIS could do it fairly easily but I haven't taken the time to look over the language yet.

The simple, lazy solution would be to add a line to the bottom of the batch file that says:
rmdir /s /q "C:\Documents and Settings\All Users\Application Data\scar5"

Of course, this is no good if you want custom settings, etc. Also if another computer you use stores the settings in a different directory you would need another line pointing to that directory. It won't produce an error message if the directory doesn't exist, but this is the absolute dirtiest solution to this problem.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 15 years 1 month ago
Joined: 2006-01-06 21:27
Well
CopyFiles "C:\Documents and Settings\All Users\Application Data\scar5" "$EXEDIR\Profile"
RMDir /s /q "C:\Documents and Settings\All Users\Application Data\scar5"

To copy to your USB and:

CopyFiles "$EXEDIR\Profile" "C:\Documents and Settings\All Users\Application Data\scar5" "$EXEDIR\Profile"

Although I haven't tried that code, it should work.
----
Ryan McCue
Cube Games
People who didn't need people needed people around to know that they were
the kind of people who didn't need people.
(Maskerade)

"If you're not part of the solution, you're part of the precipitate."

vamp1r
Offline
Last seen: 16 years 10 months ago
Joined: 2006-10-11 15:06
complete batch file

Alright, after a little more messing around here is what I have come up with. SFS maintains directories under both /All Users/scar5/ and (Current User)/scar5/. The following batch file will make sfs & it's settings completely portable as far as I can tell. I did some testing and everything appears to work perfectly.

regsvr32 /s secdel.dll

xcopy /i "Profile\sfs" "C:\Documents and Settings\All Users\Application Data\scar5\sfs"
xcopy /s /i "Profile\User" "C:\Documents and Settings\%USERNAME%\Application Data\scar5"

simplefleshrd

set copycmd = /y

xcopy /y /s /i "C:\Documents and Settings\All Users\Application Data\scar5" "Profile"
rmdir /s /q "C:\Documents and Settings\All Users\Application Data\scar5"

xcopy /y /s /i "C:\Documents and Settings\%USERNAME%\Application Data\scar5" "Profile\User"
rmdir /s /q "C:\Documents and Settings\%USERNAME%\Application Data\scar5"

regsvr32 /s /u secdel.dll
Topic locked