Results 1 to 10 of 10
  1. #1
    zarix's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Estonia
    Posts
    96
    Reputation
    10
    Thanks
    8
    My Mood
    Devilish

    Complex Help request

    Hello everyone i have a question everyone knows how to make an empty .exe
    Code:
    Dim file As System****.FileStream
            file = System****.File.Create("c:\random.exe")
    But i want to know how to make that exe do like this code shell("shutdown -s") That would be very cool if someone would tell me how i will say thank you for it!!

  2. #2
    themisterniceguy's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    the basement
    Posts
    139
    Reputation
    10
    Thanks
    105
    My Mood
    Bitchy
    Do you want it to be an exe file that open's, run's the code and closes automatticly ?
    Proud member since 2012, 4th year of service in the MPGH army
    C# Specialist



    S A D B O Y S




  3. The Following User Says Thank You to themisterniceguy For This Useful Post:

    zarix (06-08-2013)

  4. #3
    zarix's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Estonia
    Posts
    96
    Reputation
    10
    Thanks
    8
    My Mood
    Devilish
    Yes, thats it

  5. #4
    themisterniceguy's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    the basement
    Posts
    139
    Reputation
    10
    Thanks
    105
    My Mood
    Bitchy
    working on it, i will try to end it tonight
    Proud member since 2012, 4th year of service in the MPGH army
    C# Specialist



    S A D B O Y S




  6. The Following User Says Thank You to themisterniceguy For This Useful Post:

    zarix (06-08-2013)

  7. #5
    zarix's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Estonia
    Posts
    96
    Reputation
    10
    Thanks
    8
    My Mood
    Devilish
    Code:
     System****.File.AppendAllText("C:\shutdown.exe", "shutdown -s")
    so i got this from nice guy but the prob is this https://gyazo.com/55621ecf006dcd23f1c83eceeb56b3e6
    i am using VB 2010 can anyone help me out ? :|)

  8. #6
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    493
    Reputation
    104
    Thanks
    629
    Quote Originally Posted by zarix View Post
    Code:
     System****.File.AppendAllText("C:\shutdown.exe", "shutdown -s")
    so i got this from nice guy but the prob is this 55621ecf006dcd23f1c83eceeb56b3e6.png
    i am using VB 2010 can anyone help me out ? :|)
    What you posted would only work if you wrote it with a .bat extension. .exe Tells Windows that it should be looking at the PE file format, which is very different from just a string like that. If you want to actually compile a valid executable with your code, you should read into this:
    Compile code from vb.net

    Oh no! Vortex is gay!

  9. #7
    zarix's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Estonia
    Posts
    96
    Reputation
    10
    Thanks
    8
    My Mood
    Devilish
    i can do it in .bat but i want to know how to make it .exe
    Code:
     System****.File.AppendAllText("C:\text.bat", ("del C:\text"))
    how to get it text.exe?

  10. #8
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    493
    Reputation
    104
    Thanks
    629
    Quote Originally Posted by zarix View Post
    i can do it in .bat but i want to know how to make it .exe
    Code:
     System****.File.AppendAllText("C:\text.bat", ("del C:\text"))
    how to get it text.exe?
    Please read my post once again. I just explained that you need to create a file with a valid PE format if you want an exe extension, and then linked you to an explanation of how to compile an exe from vb.net

    Oh no! Vortex is gay!

  11. #9
    iamspeedforyou's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    Look up.
    Posts
    88
    Reputation
    10
    Thanks
    54
    first of all, this should work better.
    Code:
    System.Diagnostics.Process.Start("shutdown.exe", "-s -t 0")

  12. The Following User Says Thank You to iamspeedforyou For This Useful Post:

    zarix (06-09-2013)

  13. #10
    swiftyspiffy's Avatar
    Join Date
    Jun 2013
    Gender
    male
    Posts
    22
    Reputation
    10
    Thanks
    3
    There are a number of problems you face that you are not aware of, and a number of ways to go about fixing them. For one, you have choosen a simple bat script, and then attempted to execute it under the assumption it's valid executable code, which it isn't.

    To go about doing what you want (running code to shutdown/message/ect), I suggest you look into two methods:
    1. CodeDom, which will allow you to build a separate application, from your current application, with custom code (with this you can use simple vb code to perform a shutdown using the shell script)
    2. Look into a bat --> exe converter. To perform a conversion like this, you will have access to two methods. The first method, one that I recommend, would be to obtain an already built converter that accepts command line arguments (they are easy to find), and then have your program run the bat file through the conversion tool. Secondly, you can hard code the converter into your software, however I am not refreshed with the logistics of using this method, so you will need to do some research on such a topic.

    Cheers,
    Swifty

Similar Threads

  1. [Help Request] [Help Request] Reobfuscate error 1.3.2 MCP
    By LordPankake in forum Minecraft Help
    Replies: 2
    Last Post: 08-22-2012, 06:15 PM
  2. [Help Request] [Help request] Cheat engine says error on opening AVA.exe process :@
    By kalokoko in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 08-11-2012, 01:56 PM
  3. [Help Request] [Help Request] How to make No Recoil hack in Visual Studio?
    By Tstovall in forum CrossFire Help
    Replies: 5
    Last Post: 07-20-2011, 02:55 AM
  4. [Help Request] HElp request ?
    By wakosam in forum CrossFire Help
    Replies: 2
    Last Post: 07-17-2011, 06:35 PM
  5. [Help Request] Easy Help Request.
    By KrustyKokehead in forum Vindictus Help
    Replies: 6
    Last Post: 06-01-2011, 05:58 PM