2000 Server ASP and the WindowsShell

  • Thread starter Thread starter Kraig S
  • Start date Start date
K

Kraig S

Hello,

Please reply to this post..

I'm having a problem with 2000's shell and wzzip.exe, (Winzip's command line
zip application), "The application
failed to initialize properly (0x000142). Click on OK to
terminate the application" when running in a 2000 Server.

If I run the shell script by itself in a file called
zipit.vbs, it runs fine. It opens a DOS window, runs the
application, the progress dots appear and the window
closes when it's done. I look at the page where the files
and folders are and the zip file is there. If I run it the
script file zipit.vbs or the command line below from an
ASP page, I get the above error. No DOS window appears
either.

Wzzip is a command line zip program from the makers of
WinZip.

Here is the script:

'Function makeZip()
Dim WshShell
Set WshShell = CreateObject("wscript.shell")
WshShell.Run """c:\program files\winzip\wzzip.exe"" -
r -p -e0 -ybc c:\inetpub\wwwroot\temp\approvals\test.zip
c:\inetpub\wwwroot\temp\approvals\*.*"
Set wshShell=Nothing
'End Function

I remmed out the Function part because that is from the
ASP page. I removed "Server." from Set WshShell =
CreateObject("wscript.shell") because the shell scripting
engine doesn't seem to like that. In the ASP page it reads
Set WshShell = Server.CreateObject("wscript.shell").


I tried running WshShell.Run """cmd /c c:\program
files\winzip\wzzip.exe"" -r -p -e0 -ybc
c:\inetpub\wwwroot\temp\approvals\test.zip
c:\inetpub\wwwroot\temp\approvals\*.*" and
WshShell.Run """start c:\program files\winzip\wzzip.exe"" -
r -p -e0 -ybc c:\inetpub\wwwroot\temp\approvals\test.zip
c:\inetpub\wwwroot\temp\approvals\*.*" in the shell
script. No zip files were created with with either one.
However, using cmd /c in the ASP page creates the error
just as without it. Start does nothing in the ASP page
too.

The parameters in order are, (-r)=Include subfolders, (-p)
=store folder names, (-e0)= no compression, (-ybc)
=Automatic, non-interactive ("batch" mode) handling of
prompts. If a prompt is issued, the operation terminate
with error level 250. Use the optional c suffix to
automatically continue with a "yes", "ok" response instead
of terminating.


What would be the recommended procedure for an ASP page?

Kraig
 
hi

i think the problem is a problem with the right of the iiuser. you have to
add some properties. i think this is the user policy and something with
"interact with desktop" and try to give the iiuser admin rights.

georg

http://www.computerbazar.at
 
Thanks for the suggestions!

I gave the IIUSR full admin rights, same. I also gave "Everyone" full rights
to the respective folders and files. Same problem I'm not to worried about
security at this point. I looked in the command console and opened up the
properties for the web server. I couldn't find anything to do with "interact
with desktop". I do remember seeing this before, but don't remember where!.

Some interesting finds: The error "The application failed to initialize
properly (0x000142). " occurs with:
1) Wscript.exe if I run wshell.run
"c:\inetpub\wwwroot\temp\approvals\zipit.vbs".
2) ntvdm.exe if I run wshell.run "c:\winnt\system32\command.com /c
c:\inetpub\wwwroot\temp\approvals\zipit.vbs" or just command.com without the
/c
3) cmd.exe if I run wshell.run "c:\winnt\system32\cmd.exe /c
c:\inetpub\wwwroot\temp\approvals\zipit.vbs" or just cmd.exe without the /c
 
HI

I have an simelar problem with a script which i want to execute from an asp
page

I still haven't found a solution. I think the problem is that if you execute
this and it wants to open a "dos" window the windows system says "NO",
becouse some rights or whatever is missing.

sorry for the poor english :)

georg
 
I looked up ntvdm.exe on google.com. One of the results pointed to a
Microsoft discussion about a 16bit app compatibilty problem with wscript.exe
and downloading a hotfix was available. Also the hotfix was in SP4, so I
upgraded to Service pack 4, and so far the problem has not re-occured. But
SP4 has introduced new problems on boot up... which I won't get in to here.
 
Back
Top