brusper
26th May 2003 10:44 UTC
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
Sunjammer
26th May 2003 11:10 UTC
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"
brusper
26th May 2003 13:01 UTC
Thank you - that solved the problem. Extremely annoying :-)
/bph
Afrow UK
26th May 2003 13:30 UTC
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
brusper
26th May 2003 13:46 UTC
Ahh, just as I was thinking "What about Win 98..". Very nice - thanks!
/bph