Current location: Hot Scripts Forums » Programming Languages » Windows .NET Programming » File Compressor

File Compressor

Reply
  #1  
Old 11-02-09, 09:02 AM
Petrosyan Petrosyan is offline
Newbie Coder
 
Join Date: Nov 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Post File Compressor

Hi,

Is it possible in anyway to load a file into memory and then run it
from there? I am working on a file compressor, that can compress and encrypt and save
multiple files as an exe file that can then run the compressed files
after unpacking them to a temp folder. The problem is that I have to
unpack the files to the hard-disk and then run them from there, making
them vulnerable to user that may try to get the original (unprotected)
files.

So the user shouldn't have access to the file operations in the
background. So I need to keep the original unpacked files hidden from
the user, until after they are opened by the unpacker and then deleted.
So users should have no kind of access to the files (should not see
them, open them, should not be able to modify or copy them) but the
unpacker should be able to run them. (that is why I think that the
memory is the best solution)

So is there any way to protect them, like unpacking them directly to
memory and then run them from there? Something like a virtual disk in
memory?

Thanks.
Reply With Quote
  #2  
Old 11-03-09, 11:04 AM
digioz's Avatar
digioz digioz is offline
Community Leader
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 1,895
Thanks: 2
Thanked 0 Times in 0 Posts
Take a look at this MSDN Article:

Managing Memory-Mapped Files in Win32

Pete
__________________
DigiOz Multimedia
http://www.digioz.com
Reply With Quote
  #3  
Old 11-09-09, 01:21 PM
Stepanenko Stepanenko is offline
New Member
 
Join Date: Nov 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
I think you need to use component for emulating file system and registry. I know one - BoxedApp SDK. If you'll have any questions, ask me.
Reply With Quote
  #4  
Old 11-11-09, 11:07 AM
m.timoney's Avatar
m.timoney m.timoney is offline
Newbie Coder
 
Join Date: Jan 2007
Location: Leicester - UK
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
if you just want to work with a file in memory then the usual way of doing that is to read the file into a memory stream and then use the memory stream as your data-source

FileStream Class (System.IO)

MemoryStream Class (System.IO)

so you use file stream to read the compressed data, uncompress it into a Memory steam then manipulate it at will

however if you are running 3rd party software then you need to do like digioz said
__________________
Definition of a Beginner, Someone who doesn't know the rules.

Definition of an Expert, Someone who knows when to ignore the rules.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What script do I need for ths project? (Upload images script?) stevef22 PHP 2 10-30-09 06:25 PM
Hello all, can you help me? K4ot1K Other Languages 2 01-23-09 06:23 AM
Checking a file exists lee PHP 3 04-23-06 01:44 AM
Error message not getting displayed. sanjeet Windows .NET Programming 0 12-20-05 11:48 AM


All times are GMT -5. The time now is 12:22 AM.
vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2 (Unregistered)