Página 2 de 4

Re: RunSilent Action Plugin

Publicado: 31 Dic 2012 01:06
por Vampirgotk
danke gut

Re: RunSilent Action Plugin

Publicado: 06 Ene 2013 07:14
por sattel
Gracias

Re: RunSilent Action Plugin

Publicado: 03 Mar 2013 04:48
por joniny007
tks very much!!

Re: RunSilent Action Plugin

Publicado: 17 Mar 2013 17:50
por davidtxu
ok, estupendo!

Re: RunSilent Action Plugin

Publicado: 17 Mar 2013 18:20
por Ceone
enlace actualizado:

HIDE: ON
Hidebb Message Hidden Description

Re: RunSilent Action Plugin

Publicado: 01 Abr 2013 06:02
por GEORGEFTR
gracias

Publicado: 20 Abr 2013 17:49
por MrDinZ
Thank you

Publicado: 11 May 2013 20:13
por Alejandro Marín
Gracias

Publicado: 26 May 2013 02:50
por hannibal
Pabloko escribió:Bueno, resulta que he convertido un viejo proyecto en el que usaba este action, como no tenia ganas de buscar una alternativa he escrito este plugin en 5 minutos para ejecutar exes de linea de comandos y toda esa mierda.

Aqui os dejo el trozo de codigo de la funcion...

static int irrunsilent_exec (lua_State *L)
{
int nLastError = 0;
IRLUA_PLUGIN_ResetLastError(L);
CString fromClipboard;
const char* strFunct;
const char* strstrParams;
IRLUA_PLUGIN_CheckNumArgs(L,2);
strFunct=IRLUA_PLUGIN_CheckString(L,1);
strstrParams=IRLUA_PLUGIN_CheckString(L,2);
STARTUPINFO StartupInfo;
PROCESS_INFORMATION ProcessInfo;
char Args[4096];
char *pEnvCMD = NULL;
char *pDefaultCMD = "CMD.EXE";
ULONG rc;
memset(&StartupInfo, 0, sizeof(StartupInfo));
StartupInfo.cb = sizeof(STARTUPINFO);
StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
StartupInfo.wShowWindow = SW_HIDE;
Args[0] = 0;
pEnvCMD = getenv("COMSPEC");

if(pEnvCMD){

strcpy(Args, pEnvCMD);
}
else{
strcpy(Args, pDefaultCMD);
}
strcat(Args, " /c ");
strcat(Args, strFunct);
strcat(Args, " ");
strcat(Args, strstrParams);
if (!CreateProcess( NULL, Args, NULL, NULL, FALSE,
CREATE_NEW_CONSOLE,
NULL,
NULL,
&StartupInfo,
&ProcessInfo))
{
return GetLastError();
}
WaitForSingleObject(ProcessInfo.hProcess, INFINITE);
if(!GetExitCodeProcess(ProcessInfo.hProcess, &rc))
rc = 0;
CloseHandle(ProcessInfo.hThread);
CloseHandle(ProcessInfo.hProcess);
return 1;
}


Descarga
HIDE: ON
Hidebb Message Hidden Description


enlace actualizado:

HIDE: ON
Hidebb Message Hidden Description


Ejemplo de uso

RunSilent.Exec("NetStat.exe",">> C:\\RunSilent.txt");
RunSilent.Exec("IpConfig.exe",">> C:\\RunSilent.txt");

Los resultados se van añadiendo al archivo c/runsilent.txt

Publicado: 30 Ago 2013 15:51
por ACB2
gracias

Publicado: 30 Ago 2013 21:02
por chakal03
thanks

Publicado: 25 Sep 2013 15:58
por Ares-Solution
:pc: :pc: :pc: :pc:

Publicado: 28 Sep 2013 09:05
por MURATBOY31
thanks

Publicado: 03 Oct 2013 08:51
por shadikuizayoi
Could be what I'm looking for, thanks for posting. ;)

Publicado: 21 Oct 2013 21:01
por amsuser24
:friends:

Publicado: 26 Oct 2013 09:41
por filox
Gracias

Publicado: 06 Nov 2013 12:30
por mohsen
thankful

Publicado: 17 Dic 2013 05:46
por consul
Me pondré a la tarea de sacarle el mayor provecho, gracias ;)

Publicado: 17 Dic 2013 12:19
por hitec
thanks..

Publicado: 18 Dic 2013 19:36
por noadricos
\Mi proyecto.iso