Hack Forums
[.NET] Using MPress with VB.NET? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Using MPress with VB.NET? (/showthread.php?tid=2823322)



Using MPress with VB.NET? - Percocet - Aug 30, 2012

I'm trying to compress my app with Mpress but I can't find any command lines for it. I have the mpress.exe executable in my resources.

When I try this:
Code
Shell(My.Resources.mpress & "-s " & SFD.FileName, AppWinStyle.NormalNoFocus, True)

If gives me an error:
"Operator '&' is not defined for types '1-dimensional array of Byte' and 'String'"


I'm not sure where to go with this...


* - Support. - Aug 30, 2012

Christ almighty, the error explains itself! L2Code.

Seriously, look into very, very basic tut's & you'll see how silly this post is.


* - Percocet - Aug 30, 2012

(Aug 30, 2012 09:58 AM)Tony "Kommon" Stark. Wrote:  Christ almighty, the error explains itself! L2Code.

Seriously, look into very, very basic tut's & you'll see how silly this post is.

Then how the fuck am I supposed to add the "-s " and SFD.FileName to the application?


* - N3oNight - Aug 30, 2012

In simple Words,
You Need to Copy mpress to the HDD,
You Cant Use it from resource.. Thats all..


* - tweety - Aug 30, 2012

(Aug 30, 2012 10:02 AM)N3oNight Wrote:  In simple Words,
You Need to Copy mpress to the HDD,
You Cant Use it from resource.. Thats all..

He can always put it into a memory stream and run it? Right? Not sure, never tried it but give it a shot.


* - Percocet - Aug 30, 2012

OK, I have the file on HDD but now it's not running. How would I include the filename, so that the application may use it?

Here's mpress's commands and format:
Code
Usage: mpress [-options] <filename> [-options]

Options:
-i
-q
-b
-x
-S
-u
-h
-m
-r
-s
-L

I've tried the following:
Shell(Mpress + "mpress " + SFD.FileName)
File.Open(Mpress + "mpress " + SFD.FileName)
Shell(Mpress + SFD.FileName)


* - Support. - Aug 30, 2012

Dude, HF is not a live version of Google. What your asking is so simple & I know for a fact there are many threads on reading console applications output & starting programs with command line args but it's obvious you don't want to learn. Do some research because your coming across as a dumbass. Not flaming, just truth.


* - Glass Assassin - Aug 30, 2012

Try this
Code
System.Diagnostics.Process.Start("C:\YourPath\Mpress.exe", SFD.FileName & " -s")



* - SomeWhiteGuy - Aug 30, 2012

Code
IO.File.WriteAllBytes(My.Resource.mpress, My.Application.Info.DirectoryPath & "\mpress.exe")
Process.Start(My.Application.Info.DirectoryPath & "\mpress.exe", "-s")



* - Percocet - Aug 30, 2012

(Aug 30, 2012 12:07 PM)SomeWhiteGuy Wrote:  
Code
IO.File.WriteAllBytes(My.Resource.mpress, My.Application.Info.DirectoryPath & "\mpress.exe")
Process.Start(My.Application.Info.DirectoryPath & "\mpress.exe", "-s")

That worked, thank you. The others I had no luck with.


* - Daylloween - Aug 30, 2012

This is hilarious, this post is seriously coming from a guy who made this post?

https://hackforums.net/showthread.php?tid=2823363&pid=25998159#pid25998159

You didn't deserved any help, you pathetic asshole.


* - SomeWhiteGuy - Aug 30, 2012

(Aug 30, 2012 12:43 PM)๖ۣۜExample Wrote:  That worked, thank you. The others I had no luck with.

You're welcome.

Glad it helped, and that it works considering I wrote that freehand, lol.


* - Percocet - Aug 30, 2012

(Aug 30, 2012 12:48 PM)Daylloween Wrote:  This is hilarious, this post is seriously coming from a guy who made this post?

https://hackforums.net/showthread.php?tid=2823363&pid=25998159#pid25998159

You didn't deserved any help, you pathetic asshole.

I can see why you have so much -rep douchebag, also you can't find anything about Mpress on this forum.


* - marvinn - Aug 30, 2012

You can't run a byte array. Daah, write it first to the HDD and then use the path for executing it.. You should check out UbbeLoL's compressor. Might come in handy :)