SHELL assistance- "file not found" & others

good morning all!I am having an issue with the SHELL Command (my first time).

On a windows 2000 server, i can START>RUN the follwing command:

C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32exe /p /h d:\Lotus\Domino\mypdf.PDF

which starts acrobat reader on the server and prints that file “mypdf.pdf”

My LS code is as follows to try to simulate the same:

ReturnVal = Shell(“C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32exe /p /h d:\Lotus\Domino\vfi322A.PDF”,3)

but i get a “file not found error”.

What am I doing wrong?

The file IS at that location, and opens fine from the commmand box.

I have restricted and unrestricted rights onthe server.

If I use ReturnVal = Shell(“cmd /c start C:\Program Files\Adobe\Acrobat 6.0\Reader\AcroRd32exe /p /h d:\Lotus\Domino\vfi322A.PDF”,3)

I get a return of 33, but nothing happens on the win2k server.

Are there any rights i need on the OS to execute the command?

Ive set the printer as default, and im logged in as administrator when i test from the command prompt.

Thanks for your help! This was an all night brain teaser!

Subject: SHELL assistance- “file not found” & others

Not 100% sure on this, but it may be down to the file path having spaces in it. I seem to remember having this problem when I had an agent running a batch file with R4.6.

Try replacing the spaces with %20 and see if that makes a difference. Let me know if you still have no luck and I’ll go back and see if I can find the code I mentioned.

Cheers.

Subject: RE: SHELL assistance- “file not found” & others

If the file has spaces in it, I solved this issue like this:

fileName$=“c:\myFolder\my file.pdf”

fileName$= chr(34) & fileName$ & chr(34)

x=shell("C:\Program Files\Adobe\Reader 8.0\Reader\AcroRd32.exe " & fileName$,1)

The space between acroRd32.exe and the following double quotes is necessary.

Subject: SHELL assistance- “file not found” & others

Hello Sheri, Just wanted to check if you were able to crack this.

I’m stuck in same situation :-((

Ajay