--- In [email protected], "Wai" <chunwaih...@...> wrote:
>
> --- In [email protected], "brucexs" <bswitzer@> wrote:
> >
> > --- In [email protected], "Wai" <chunwaihome@> wrote:
> 
> 
> > >i am also looking for lots of software which most of them only
> > >get the name with graphic console. For example sysinternal
> > >process explorer, system explorer and sysinternal handle which is
> > >near to my aim getting the information with the command includ
> > >the opened file name.

If you want the command line that opened the program (which may or may not 
include the current file) you can use the following (note that in XP, wmic.exe 
only works when user is an Administrator):

local clipcontent=clip.get
clip.clear
local appprocess=win.handle("under").getprocessid
local wmicmd= ;;+
?"/c wmic /output:clipboard process "++appprocess++" GET commandline"
file.runwait(0, env("COMSPEC"), wmicmd, "", "hide")
local commandline=regex.pcrereplace(?"^CommandLine\x20+",clip.get,"")
clip.set(clipcontent)
win.debug(commandline)

Regards,
Sheri

Reply via email to