B4J Question Open DOS box and keep it open

Douwe Siegersma

Member
Licensed User
I use the following code to open a DOS box. I thought the "/k" option would keep it open but it doesn't.


B4X:
    Dim lijst As List
    lijst.Initialize
    lijst.Add("/k")
    Shll.Initialize ("shll","c:\windows\system32\cmd.exe",lijst)
    Shll.Run(-1)
 

Daestrum

Well-Known Member
Licensed User
B4X:
 sh.Initialize("shll","cmd",Array("/K","start"))
 sh.Run(-1)
NOTE - when run from the IDE the cmd window will appear to close, it doesn't, it just goes to task bar.
 
Top