eevaldo Posted August 4, 2016 Report Share Posted August 4, 2016 Ola colegas como faço para abrir uma janela DOS no windows 10 de dentro do sistema ? , pois o winexec("command.com") ou winexec("cmd") não funcionam. (se é que é possivel, rs) Dese já agradeço Quote Link to comment Share on other sites More sharing options...
Rogerio Figueira Posted August 4, 2016 Report Share Posted August 4, 2016 Evaldo, uso assim no win10 normal: ACTION WinExec("CMD.EXE") Microsoft Windows [versão 10.0.14393]© 2016 Microsoft Corporation. Todos os direitos reservados. C:\WF\CP318> []´s Quote Link to comment Share on other sites More sharing options...
kapiaba Posted August 4, 2016 Report Share Posted August 4, 2016 //////////////////////////////////////////////////////////////////////////// // // Autor: Jose Carlos da Rocha // Data: 07/05/2015 // Email: irochinha@hotmail.com.br // Linguagem: xBase / Fivewin // Plataformas: DOS, Windows // Requerimentos: Harbour/xHarbour // ///////////////////////////////////////////////////////////////////////////// #include "FiveWin.ch" FUNCTION MAIN() ? ; 'ShellExecute( "CMD.EXE", "RUNAS", "", "C:\WINDOWS\SYSTEM32", 1 )',,; ShellExecute( "CMD.EXE", "RUNAS", "", "C:\WINDOWS\SYSTEM32", 1 ) RETURN .T. #pragma BEGINDUMP #include <windows.h> #include <hbapi.h> // ShellExecute( cFile, cOperation, cParams, cDir, nFlag ) HB_FUNC( SHELLEXECUTE ) { hb_retnl( (LONG) ShellExecute( GetActiveWindow(), ISNIL(2) ? NULL : (LPCSTR) hb_parc(2), (LPCSTR) hb_parc(1), ISNIL(3) ? NULL : (LPCSTR) hb_parc(3), ISNIL(4) ? "C:\\" : (LPCSTR) hb_parc(4), ISNIL(5) ? 1 : hb_parni(5) ) ) ; } #pragma ENDDUMP Quote Link to comment Share on other sites More sharing options...
eevaldo Posted August 4, 2016 Author Report Share Posted August 4, 2016 //////////////////////////////////////////////////////////////////////////// // // Autor: Jose Carlos da Rocha // Data: 07/05/2015 // Email: irochinha@hotmail.com.br // Linguagem: xBase / Fivewin // Plataformas: DOS, Windows // Requerimentos: Harbour/xHarbour // ///////////////////////////////////////////////////////////////////////////// #include "FiveWin.ch" FUNCTION MAIN() ? ; 'ShellExecute( "CMD.EXE", "RUNAS", "", "C:\WINDOWS\SYSTEM32", 1 )',,; ShellExecute( "CMD.EXE", "RUNAS", "", "C:\WINDOWS\SYSTEM32", 1 ) RETURN .T. #pragma BEGINDUMP #include <windows.h> #include <hbapi.h> // ShellExecute( cFile, cOperation, cParams, cDir, nFlag ) HB_FUNC( SHELLEXECUTE ) { hb_retnl( (LONG) ShellExecute( GetActiveWindow(), ISNIL(2) ? NULL : (LPCSTR) hb_parc(2), (LPCSTR) hb_parc(1), ISNIL(3) ? NULL : (LPCSTR) hb_parc(3), ISNIL(4) ? "C:\\" : (LPCSTR) hb_parc(4), ISNIL(5) ? 1 : hb_parni(5) ) ) ; } #pragma ENDDUMP Quote Link to comment Share on other sites More sharing options...
eevaldo Posted August 4, 2016 Author Report Share Posted August 4, 2016 OK OBRIGADO , funcionou com o ShellExecute , com o winexec como estava antes nao funciona. Pode ser alguma configuração do meu windows talvez kapiaba 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.