Sign in to follow this  
Followers 0
eastmus

_WINAPI_CreateProcess

5 posts in this topic

#Include <WinAPI.au3>

_WinAPI_CreateProcess($sAppName, $sCommand, $pSecurity, $pThread, $fInherit, $iFlags, $pEnviron, $sDir, $pStartupInfo, $pProcess)

$sAppName The name of the module to be executed

$sCommand The command line to be executed

$pSecurity Pointer to $tagSECURITY_ATTRIBUTES structure that determines whether the returned handle can be

inherited by child processes.

$pThread Pointer to $tagSECURITY_ATTRIBUTES structure that determines whether the returned handle can be

inherited by child processes.

$fInherit If True, each inheritable handle in the calling process is inherited by the new process

$iFlags Flags that control the priority class and creation of the process

$pEnviron Pointer to the environment block for the new process

$sDir The full path to the current directory for the process

$pStartupInfo Pointer to a $tagSTARTUPINFO structure

$pProcess Pointer to a $tagPROCESS_INFORMATION structure

i need some example on how to use this.

I only need it to launch another executable like "game.exe".

How do i write the parameter for $sDir to be current dir?

thanks

#Include <WinAPI.au3>
$sAppName = "game.exe"
$sCommand = ""
$pSecurity = ""
$pThread = ""
$fInherit = ""
$iFlags = ""
$pEnviron = ""
$sDir = ""
$pStartupInfo = ""
$pProcess = ""
_WinAPI_CreateProcess($sAppName, $sCommand, $pSecurity, $pThread, $fInherit, $iFlags, $pEnviron, $sDir, $pStartupInfo, $pProcess)

Share this post


Link to post
Share on other sites



Run("Game.exe")

thanks.

Is there a way to hide the PID from taksmanager ? Run an executable as hidden process

Share this post


Link to post
Share on other sites

thanks.

Is there a way to hide the PID from taksmanager ? Run an executable as hidden process

I dont know, but I do know that that sort of discussion attracts the wrong kind of attention here, and I personally cannot think of a single non malicious reason to hide a process from task manager.

I'm sure you will get other views though.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

I dont know, but I do know that that sort of discussion attracts the wrong kind of attention here, and I personally cannot think of a single non malicious reason to hide a process from task manager.

I'm sure you will get other views though.

i see, thanks. Didnt think that way

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0