Luis Lavena wrote in post #963322: > On Nov 23, 12:08am, Fengfeng Li <lifengf... / huawei.com> wrote: >> :startup_info=> {:sw_flags=>Process::SW_HIDE , :startf_flags => >> Process::STARTF_USESHOWWINDOW} ) >> #at last, I use process.create and the black window disappeared. >> >> It worked good when I set cmd as "\"#{winrar_path}\\winrar.exe\" e -y >> -o+ -ibck \"#{para[:dst_path]}\\*.zip\" \"#{para[:dst_path]}\\\"", but >> when I changed it to "del *.zip", it always said "CreateProcess() >> failed: ", as below: >> > > WinRAR will pop up a Windows during extraction. > > You need a command line version tool like 7-zip (7za) that works in > the command line and can be hidden or look in WinRAR documentation > about silent command line extraction arguments. Thanks for your reply. Maybe I didn't explain my problem clearly. My problem is the process.create works fine with winrar, but when I change the cmd as "del *.zip", it says "CreateProcess() failed", I wonder why the "del *.zip" cann't work with process.create. as below: cmd = "del *.zip" Process.create( :app_name => cmd, :startup_info=> {:sw_flags=>Process::SW_HIDE , :startf_flags => Process::STARTF_USESHOWWINDOW} ) -- Posted via http://www.ruby-forum.com/.