|
-
Nov 20th, 2008, 02:17 PM
#1
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 02:21 PM
#2
Re: [2005] Append exe onto exe?
All that does is make both exe files unusable...
-
Nov 20th, 2008, 02:24 PM
#3
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 02:33 PM
#4
Re: [2005] Append exe onto exe?
If that is all you want to do, then there is a very simple solution built right into VB.NET
Just go into project properties, and go to the resources tab. Drag the exe you want to be embedded into this screen, and it will add it as a resource (which means it gets compiled inside the app)
Then, in your code, to extract and write the embedded exe to disk, its just one line of code:
Code:
My.Computer.FileSystem.WriteAllBytes("C:\newfilename.exe", My.Resources.EmbeddedExeName, False)
EmbeddedExeName will be whatever the name of the resource you added was (by default it will be the exe name without .exe on it).
-
Nov 20th, 2008, 02:36 PM
#5
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 02:50 PM
#6
Re: [2005] Append exe onto exe?
In runtime you don't need to append an .exe
- You either start it...
- Copy it as a binary to somewhere else...
- Add the Path to the exe to your config file for some reason.
You can not include it into your .exe because that's running, hence readonly.
Quetion why do you want to append an exe at runtime other then...
- including viruses/trojans after you've passed as firewall...
If you want to have a dynamic setup to your application use modules (in dll's)
this way you can easily add functionality if a license provides rights to a certain functionallity.
 why can't programmers keep and 31 Oct and 25 dec apart. Why Rating is Useful
for every question you ask provide an answer on another thread.
-
Nov 20th, 2008, 02:57 PM
#7
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 02:59 PM
#8
Re: [2005] Append exe onto exe?
it can be done, but i wouldn't recommend it. antivirus programs will pick it up as a malicious file.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Nov 20th, 2008, 03:02 PM
#9
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:08 PM
#10
Lively Member
Re: [2005] Append exe onto exe?
you can use it like this, give the exe to the people who you want them to be able to play it so if someone doesn't have the exe he will be getting an error message like "file.exe is missing" and he won't be able to run it
-
Nov 20th, 2008, 03:09 PM
#11
Re: [2005] Append exe onto exe?
Well lets say you could do this, when you extract the game exe so that it can be loaded into memory, it could simply be copied from the location it was extracted to, to another location on disk. Then and the user has bypassed your copy protection.
-
Nov 20th, 2008, 03:10 PM
#12
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:12 PM
#13
Re: [2005] Append exe onto exe?
out of curiosity, how was your app going to decide when they should be allowed to use the given exe?
-
Nov 20th, 2008, 03:15 PM
#14
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:18 PM
#15
Re: [2005] Append exe onto exe?
So instead of just having game.exe and launching that, they launch YOUR exe, and click a button which in turn launches game.exe???
How is that preventing anything?
-
Nov 20th, 2008, 03:20 PM
#16
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:30 PM
#17
Re: [2005] Append exe onto exe?
Glad you figured it out, because it still makes no sense 
If you don't want them to give game.exe to someone, and your only copy protection is having your app launch the said exe, then someone could again just give out your exe to launch the game.exe.
-
Nov 20th, 2008, 03:33 PM
#18
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:35 PM
#19
Re: [2005] Append exe onto exe?
the first question to ask yourself is do you really expect this game.exe to be pirated?
-
Nov 20th, 2008, 03:38 PM
#20
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:39 PM
#21
Addicted Member
Re: [2005] Append exe onto exe?
just put the exe as a resource then extract it some wierd place on the computer, when they click the button to play?
-
Nov 20th, 2008, 03:43 PM
#22
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 03:45 PM
#23
Addicted Member
Re: [2005] Append exe onto exe?
make a settings file where you store the exe files bytes. Then encrypt it in some way.
-
Nov 20th, 2008, 03:46 PM
#24
Re: [2005] Append exe onto exe?
you really are being naive.
-
Nov 20th, 2008, 03:48 PM
#25
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 04:28 PM
#26
Re: [2005] Append exe onto exe?
the bottom line is once the game.exe can be loaded, it will be extracted to disk. You can't extract the bytes of game.exe and magically load that into memory as a process without putting it on disk first.
The very act of copying this exe to disk after extracting it from your exe, means the user could then simply copy the exe. It doesn't matter if you put it in some "obscure" place, it is very very simply to find out where a given exe is running from.
On that note as well, if you simply embedded the game.exe as an array of bytes into your main.exe as a resource, there are tools made specifically for simple extraction of resources from a .NET file.
-
Nov 20th, 2008, 04:38 PM
#27
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 04:45 PM
#28
Re: [2005] Append exe onto exe?
as matt keeps pointing out, there is no easy way to do this.
-
Nov 20th, 2008, 05:07 PM
#29
Re: [2005] Append exe onto exe?
 Originally Posted by knxrb
So your verdict is that it's not possible without people being able to copy it?
does game maker have any time of internet connectivity in its framework (ie can you write code in it to actually connect out to the web?)
If so, then you could do some login based system to play the game, and require an internet connection.
Take a system live Valve's steam platform. You can install it anywhere, and log into your account, and download and play any games you own, but you can only be doing this in one place at one time, because it knows you logged in. Once you login elsewhere, the last login is invalid.
Based on the fact that you didn't actually make this game, but you used some tool that is a scripting language on top of a game engine, you have much less control over the end result, and that makes any sensible copy protection likely to be a bit harder.
Perhaps if you plan to sell this game, you could entice buyers by offering free updates for life, and issuing some new levels to paid customers for free at some point or something like that..
-
Nov 20th, 2008, 05:09 PM
#30
Thread Starter
Hyperactive Member
-
Nov 20th, 2008, 11:38 PM
#31
Junior Member
Re: [2005] Append exe onto exe?
Note i will recommended you learn C++ for that... Because it might end up being more of a game server and so far i have seen it done on C++. But if all you want is to create log ins/ registration might want to try php and MySQL
anyways back to Visual Basics. you might want to use this code:
Code:
Public Class SplashScreen3
Dim file As String
Dim gameloaded As Process
Sub loader()
Dim program As New Process()
Me.file = "temp.exe"
Dim file_resource As Byte()
file_resource = My.Resources.<<X>>
Me.file = "temp.exe"
Dim b As Byte() = file_resource
Try
Dim Game As System.IO.FileStream = IO.File.Create(file)
Dim attribute As System.IO.FileAttributes = IO.FileAttributes.Hidden
System.IO.File.SetAttributes(file, attribute)
Game.Write(b, 0, b.Length)
Game.Close()
Try
Me.gameloaded = Process.Start(file)
Catch
System.Windows.Forms.MessageBox.Show("by Gencast")
If My.Computer.FileSystem.FileExists(file) Then
My.Computer.FileSystem.DeleteFile(file)
End If
Me.Dispose()
End Try
Me.Dispose()
Catch
Try
Me.gameloaded = Process.Start(file)
Me.Dispose()
Catch ex As Exception
Me.Dispose()
End Try
Me.Dispose()
End Try
End Sub
yes i pretty much gave you the damm code. how nice i am... anyways the file will not be seen unless user has there settings set to "See all file including hidden files"
The program will read a resource file in this case a .exe and create a temporary hidden file that one fully extracted will lunch automatically. You migth want to use a splashscreen.
To make it more privet add a sing in box (username and password). you may want to link it some how to a server or make one apart from server.
NOTE: for every 1 programmer there are 10+ hackers and this may include the programmer in some cases. So now that in one way or another this can be pirated, unless you are a pro in 64bit which I don't think you are...
Enjoy and please add me to your credits sense i pretty much made the runner for you
need anything else PM me
Last edited by Gencast; Nov 20th, 2008 at 11:42 PM.
-
Nov 21st, 2008, 05:07 AM
#32
Thread Starter
Hyperactive Member
-
Nov 21st, 2008, 05:20 AM
#33
Thread Starter
Hyperactive Member
Re: [2005] Append exe onto exe?
How would I get it to delete the file after it has finished running?
I tried adding this code after the 'Me.gameloaded = Process.Start(file)'
Code:
Me.gameloaded.WaitForExit()
If My.Computer.FileSystem.FileExists(file) Then
My.Computer.FileSystem.DeleteFile(file)
End If
...but it didn't delete it!
Did I help you with your problem? If I did rate me by clicking here: Rate knxrb

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|