lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Attila wrote:
I want to execute a command to get the label of a hard disk by VOL C:. The only problem that os.execute() flashes the black shell window, and I don't like this. I guess it's possible without it, but don't know, how.

If you can tolerate an icon flashing in the taskbar (and you started the program from a console) this could do:

  local cmd = 'dir'
  os.execute('start /min cmd /c ' .. cmd)

else I guess you'll have to use alien and call the relevant Windows API (I don't know which one).

  Enrico