ShellExecute() set as wait run
-
- Posts: 465
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Contact:
ShellExecute() set as wait run
Hi!
prg:
ShellExecute(...)
msginfo("2")
Msginfo() will be run before shellexecute closed , how to set shellexecute, after it is closed, then run msginfo() ?
TKS!
Shuming Wang
prg:
ShellExecute(...)
msginfo("2")
Msginfo() will be run before shellexecute closed , how to set shellexecute, after it is closed, then run msginfo() ?
TKS!
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Re: ShellExecute() set as wait run
I think you should use WAITRUN(...)
WaitRun("notepad.exe ERROR.TXT")
WaitRun("notepad.exe ERROR.TXT")
Re: ShellExecute() set as wait run
Hi;
MsgRun( "MsgRun() Run Wait", "From FWH 17.05", { || ShellExecute(...), MsgInfo( "2" ) }, oWnd )
MsgRun( "MsgRun() Run Wait", "From FWH 17.05", { || ShellExecute(...), MsgInfo( "2" ) }, oWnd )
Mario Antonio González Osal
Venezuela
m a g 0 7 1 @ g m a i l. c o m
Venezuela
m a g 0 7 1 @ g m a i l. c o m
- richard-service
- Posts: 806
- Joined: Tue Oct 16, 2007 8:57 am
- Location: New Taipei City, Taiwan
- Contact:
Re: ShellExecute() set as wait run
Hi Mr.Wang
I lose my WeChat account. so my new WeChat ID is fivetech_taiwan. please add it.
I have your TMySQL question.
Thanks a lot.
I lose my WeChat account. so my new WeChat ID is fivetech_taiwan. please add it.
I have your TMySQL question.
Thanks a lot.
Best Regards,
Richard
Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
Richard
Harbour 3.2.0dev (r2402101027) => Borland C++ v7.7 32bit
MySQL v8.0 /ADS v10
Harbour 3.2.0dev (r2011030937) => Borland C++ v7.4 64bit
-
- Posts: 465
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Contact:
Re: ShellExecute() set as wait run
wairun() do not execute paraments as " mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001"
msgrun still run msginfo() before shellexecute() closed.
Thanks all!
Regards!
Shuming Wang
msgrun still run msginfo() before shellexecute() closed.
Thanks all!
Regards!
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
- Enrico Maria Giordano
- Posts: 8734
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Has thanked: 1 time
- Been thanked: 1 time
- Contact:
Re: ShellExecute() set as wait run
ShumingWang wrote:wairun() do not execute paraments as " mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001"
Yes, it does:
Code: Select all | Expand
WaitRun( "mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001" )
I'm not sure about redirection, though...
EMG
-
- Posts: 465
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Contact:
Re: ShellExecute() set as wait run
With aitrun() not success , seems immediatley closed.
Shuming Wang
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
-
- Posts: 6
- Joined: Tue Sep 23, 2014 5:22 am
- Location: Kochi, India
Re: ShellExecute() set as wait run
Try this,
Code: Select all | Expand
MsgWait("Mysql database backup","Backup",Winexec( "c:\mysql\mysqldump --host 192.168.1.200 -u root -p -C mydatabase>d:\back\mysqldatebas0001"))
-
- Posts: 465
- Joined: Sun Oct 30, 2005 6:37 am
- Location: Guangzhou(Canton),China
- Contact:
Re: ShellExecute() set as wait run
Still not success , after input mysql password, seems immediatley closed.
Shuming Wang
Shuming Wang
http://www.xtech2.top
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Mobile:(86)13802729058
Email:100200651@qq.com
QQ:100200651
Weixin: qq100200651
Re: ShellExecute() set as wait run
Try this,
cArquivoBAT := 'filebat.bat'
cComando := 'mysqldump --host 192.168.1.200 -u root -p -C mydatabase > "d:\back\mysqldatebas0001" '
MsgRun( 'Aguarde...',, { || ExecutaComando( cArquivoBAT, cComando ) )
/******************************************************************************/
static procedure ExecutaComando( cArquivoBAT, cComando )
/*
*/
if !CriaArquivoBatLocal( cArquivoBAT, cComando )
MsgStop('Não foi possível criar o arquivo !', 'Atenção!')
else
WaitRun(cArquivoBAT,.f.)
endif
Ferase(cArquivoBAT)
return
/******************************************************************************/
function CriaArquivoBatLocal( cArquivo, cComando )
/*
*/
local oArquivo
Ferase(cArquivo)
oArquivo := TTxtFile():Create( cArquivo )
if !oArquivo:Open()
return .f.
endif
oArquivo:add('@echo off:')
oArquivo:add(cComando)
oArquivo:Close()
return .t.
cArquivoBAT := 'filebat.bat'
cComando := 'mysqldump --host 192.168.1.200 -u root -p -C mydatabase > "d:\back\mysqldatebas0001" '
MsgRun( 'Aguarde...',, { || ExecutaComando( cArquivoBAT, cComando ) )
/******************************************************************************/
static procedure ExecutaComando( cArquivoBAT, cComando )
/*
*/
if !CriaArquivoBatLocal( cArquivoBAT, cComando )
MsgStop('Não foi possível criar o arquivo !', 'Atenção!')
else
WaitRun(cArquivoBAT,.f.)
endif
Ferase(cArquivoBAT)
return
/******************************************************************************/
function CriaArquivoBatLocal( cArquivo, cComando )
/*
*/
local oArquivo
Ferase(cArquivo)
oArquivo := TTxtFile():Create( cArquivo )
if !oArquivo:Open()
return .f.
endif
oArquivo:add('@echo off:')
oArquivo:add(cComando)
oArquivo:Close()
return .t.