microsoft / dotnet-framework-docker

The repo for the official docker images for .NET Framework on Windows Server Core.
https://hub.docker.com/_/microsoft-dotnet-framework
MIT License
702 stars 336 forks source link

Running simple visual basic script for unzipping a zip file throws Unspecified Error #1092

Closed christopher-watanabe-snkeos closed 1 year ago

christopher-watanabe-snkeos commented 1 year ago

Describe the Bug

I would like to run a visual basic script inside the docker container that places zipped content into a destination inside the docker container. It appears there may be something missing in the base image I am using: mcr.microsoft.com/dotnet/framework/runtime:4.8-windowsservercore-ltsc2019, as any attempts to do this yield an unspecified error.

Steps to Reproduce

  1. Clone https://github.com/christopher-watanabe-snkeos/dotnet-framework-docker-batch-file-issue
  2. Create a testZip.zip with some dummy content inside.
  3. Build the docker container; e.g. docker build . -t test-dotnet-batch-issue
  4. Run the docker container in interactive mode. e.g. docker container run -it test-dotnet-batch-issue
  5. Try to run the .vbs script with cscript ./test.vbs

From these steps, I notice the following:

It seems the hangup is this line in the .vbs file: set zipFiles=objShell.NameSpace(zipFilename).items

Other Information

I know I can work around this by writing for example a powershell script that uses Windows native Expand-Archive. In the scope of another project, the unzipping is accomplished by a .vbs script however, so I would like to understand more about why this is happening.

Output of docker version

Client: Version: 20.10.9 API version: 1.41 Go version: go1.16.8 Git commit: c2ea9bc Built: Mon Oct 4 16:11:10 2021 OS/Arch: windows/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.9 API version: 1.41 (minimum version 1.24) Go version: go1.16.8 Git commit: 79ea9d3 Built: Mon Oct 4 16:06:39 2021 OS/Arch: windows/amd64 Experimental: false

mthalman commented 1 year ago

[Triage] This is better suited for the Windows-Containers repo which the .NET Framework container images are based on. The use of cscript is native to the base Windows image so that's the place to start an investigation from. You'll need to log a new issue there as this issue can't be transferred to that repo unfortunately.