Jump to content


Photo

Execute_program/shell With More Options


  • Please log in to reply
12 replies to this topic

#1 torigara

torigara

    GMC Member

  • GMC Member
  • 6507 posts

Posted 18 June 2007 - 05:57 PM

Download: ExecteEx100.zip
It contains the DLL, .gml, help file (.html) and an example (gm6.)

The DLL mainly provides two functions:
execute_program_ex to execute a program.
execute_shell_ex to open a file with the shell.

These are basically the same as in-built functions, execute_program and execute_shell. However, these provide a couple more options:
  • setting the working directory for the program.
  • starting a program with maximized, minimized or hidden.
  • (execute_program_ex only) setting the initial size and/or position of the window of the program.
  • (execute_shell_ex only) specifying an action on opening a file. E.g. "print" to print a document, "properties" to show the file properties dialog, and "play" to play an audio file, etc. If no action is specified, it defaults to "open."
  • When a program fails to start for some reason, you can retrieve the error message that tells the cause of the error.
* Note that setting position/size or run minimized/hidden doesn't work for all programs. Whether to follow these settings or not is up to the target program. Specifically, games made with GameMaker will refuse to change its position/size or to start with minimized/hidden.

Edited by torigara, 15 January 2011 - 04:52 PM.

  • 3

#2 Daniel-Dane

Daniel-Dane

    GMC Member

  • New Member
  • 3581 posts

Posted 18 June 2007 - 06:02 PM

Hmm, I've been wanting to make one myself. Maybe add priority?
  • 0

#3 allong

allong

    GMC Member

  • GMC Member
  • 191 posts

Posted 09 January 2008 - 04:58 PM

Woah, Dude!

Don't you know that this could be used to cause some serious damage? If you could freeze a game while in play and search for it's dll's and then one could crack the DLL (Not too hard if you are expert) and then set the working directory to those cracked ones and then implode a game.

(For noobs: It's like feeding nuclear waste to a monkey instead of its usual bamboo, it rewrites the monkey's logic)
  • 0

#4 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 09 January 2008 - 07:34 PM

Don't you know that this could be used to cause some serious damage?

Yeah, like 20% of GM built in functions.
  • 0

#5 Arial

Arial

    GMC Member

  • Banned Users
  • 580 posts
  • Version:GM8

Posted 24 May 2008 - 08:38 PM

Don't you know that this could be used to cause some serious damage?

Yeah, like 20% of GM built in functions.

How do you know that? Did you cracked?
Screw everyone who puts my quotes in his signature to make fun out of me.

#6 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 25 May 2008 - 12:14 AM

execute_shell() and execute_program() is equally dangerous as this.
  • 0
GM 8.1 / GM:HTML5 User

#7 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 26 May 2008 - 01:33 PM

This is very easy to create in delphi, I tried one myself (not a dll though) it's up to you to guess for what.
Well a very usefull feature would be to return some process information.
I believe you used create_process() or shell_execute()? In that case, for more features use create_process_ex()
Regards,
Christian
  • 0

#8 HaRRiKiRi

HaRRiKiRi

    GMC Member

  • GMC Member
  • 1364 posts

Posted 27 May 2008 - 08:43 AM

How do you know that? Did you cracked?

Why would I need to crack it? Its just that execute_file, execute_shell, execute_program, registry functions and even file functions can be used for bad purposes. There are A LOT of functions in GM that can cause damage.
  • 0

#9 Sindarin

Sindarin

    Indie Game Developer

  • New Member
  • 1644 posts
  • Version:GM:HTML5

Posted 27 May 2008 - 03:04 PM

How do you know that? Did you cracked?


The only words I hear from Arial the last days are either "crack" or "decompile". :P

This is very easy to create in delphi, I tried one myself (not a dll though) it's up to you to guess for what.


I managed to create such a dll myself as well once although I had problems making the game wait for the launched program to end.
  • 0
GM 8.1 / GM:HTML5 User

#10 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts
  • Version:Unknown

Posted 28 May 2008 - 01:23 PM

The only words I hear from Arial the last days are either "crack" or "decompile".

Oh, it's an imporvement then :) . Just kidding.

I managed to create such a dll myself as well once although I had problems making the game wait for the launched program to end.

About.com has a tutorial for that.
  • 0

#11 probbiethe1

probbiethe1

    GMC Member

  • New Member
  • 2 posts

Posted 03 April 2013 - 01:15 AM

I just wanted to say this dll is awesome and can even be combined with embed.dll to make some awesome programs.

 

Thanks for the great instructions and example combined in the download. This is how a dll should be shared.


  • 0

#12 Tthecreator

Tthecreator

    GMC Member

  • GMC Member
  • 241 posts
  • Version:GM:Studio

Posted 04 August 2013 - 12:06 PM

doesn't works for studio...at the beginning...just remove all the if variable exists functions and you will be fine for studio...

the normal execute_shell and file doesn't wokr in studio and this is a perfect replacement


  • 0

progresses of my games:

IMPF maincoms: 5%, just making it for my friends as an reaction test since we are a tf2 team using some minigames and trowing some networking in. not shore why i'm telling this but i could make it public for anyone on request

Breaktrough engine: 1%, making an engine that is reliable, moddable(as in external data), using as many features from myself as possible. Unfortunetly i had a drawback due to corrupted files.

site: http://www.digithomas.nl (dutch)

 

#13 Nallebeorn

Nallebeorn

    Valar Morghulis

  • GMC Member
  • 703 posts
  • Version:GM:Studio

Posted 09 November 2013 - 04:17 PM

Yeah, this does indeed work nice as a replacement for the in Studio obsolete execute_program and execute_shell. Nice work!


  • 0

oldGMCsig1.png oldGMCsig2.png oldGMCsig3.png oldGMCsig4.png oldGMCsig5.png