Shell command gets into an infinite loop

  • Thread starter Margaret Bartley
  • Start date
M

Margaret Bartley

I'm using Terry Kreft's Shell Wait code from the mvps
website to use an old MS-DOS program, PKZip, to zip some
files. The command I am passing works in the Command
window.

This is Access97 on Win98.

When I call the Shell function:
lRetVal = Shell("c:\pkzip\pkzip.exe c:\junk\test1
c:\junk\test.txt", vbHide)
I notice that WinOldAp is still running in the background
(ctl+alt+del), even after I've shut down Access.

When I call ShellWait
ShellWait "c:\pkzip\pkzip.exe c:\junk\test
c:\junk\test.txt", vbHide
It goes into an infinite loop that I can't break out of,
except to turn off my machine. WinOldApp is running in the
background.

I'd like to know more about the Shell function - is there a
way to fix this? Is it becuase it's calling an old DOS
program?

If so, is there another way I can zip and unzip files
programmatically, without user intervention, from code?

Many thanks,
Margaret
 
M

Margaret Bartley

Correction: the program that's left running is WinOldAp, not
WinOldApp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top