Archive: Problem with ExecWait


Problem with ExecWait
I am having problems with the following code in ExecWait:

ExecWait "dir D:\InetPub\top.htm /s /b > C:\temp\toppramar.lst"

The idea is to generate a list file (C:\temp\toppramar.lst) that is supposed to contain all files named top.htm located somewhere under D:\InetPub. This works like charm in the command processor, but leaves no trails when executed as a ExecWait i NSIS. I have tried all obscure variations of ' and ", but I guess I missed the obvious solution :-)

/bph


Have you tried this? (obviously cmd only works on 2k/xp and maybe nt, but you get my point)

ExecWait "cmd /C dir D:\InetPub\top.htm /s /b > C:\temp\toppramar.lst"

Thank you - that solved the problem. Extremely annoying :-)

/bph


Make sure uou get hold of COMSPEC and not just use "cmd" because that only works on win2k/xp

Use:


ReadEnvStr $0 COMSPEC
ExecWait "$0 /C dir D:\InetPub\top.htm /s /b > C:\temp\toppramar.lst"


-Stu

Ahh, just as I was thinking "What about Win 98..". Very nice - thanks!

/bph