| |
ehase
Posts: 1
Score: 0
Joined: 8/4/2008
Status: offline
|
Hi there, I'm hoping someone on these forums might help me solve my issue. Just as a little background, I'm a self taught coder; sometimes I find ways of doing things but I don't always understand what I've done. I do my best to try to understand what's happening, but somethings the fine details escape me. I think that's where I am now. I'm trying to launch gzip from a command line to decompress a file. The page I've created executes without errors but the file I'm trying to decompress isn't being decompressed. some of the troubleshooting steps I've taken have included: 1. I've verified my run command is proper. That is, %ComSpec% /C gzip -d "C:\Inetpub\wwwroot\gzip\gzip.gz" executed from the Run dialog does decompress the proper file. 2. I've verified that the directory containing the gzip.exe, cmd.exe, and the gzip.gz file have the appropriate read/write/execute permissions for the iusr account on the IIS sever. 3. with TaskManager open on the IIS Server, I can see a cmd.exe process start and end when the page is loaded. This tells me that the the page is interacting with the cmd.exe properly. My code has been diluted to the following: <% strGZipFile = """C:\Inetpub\wwwroot\gzip\gzip.gz""" runGUnZip = "%ComSpec% /C gzip -d " & strGZipFile Set oShell = Server.CreateObject("Wscript.Shell") oShellRunReturnValue = oShell.Run(runGUnZip,1,True) response.write oShellRunReturnValue set oShell=nothing %> When I run this code, I get a response of 1 from the oShellRunReturnValue; as I understand it 1 isn't good. :( Here are some areas I'm fuzzy with: 1. In the run command, I've not been able to determine what 1,True actually mean. I believe True means to delay processing until the cmd.exe command is complete, but what does 1 mean? I've seen examples which show 0,False; 1,False; 0,True, etc. Can someone give me an official breakdown of what these two parameters represent? 2. Why would my page create a cmd process, with a known good decompress command, yet not decompress the file? I have noticed that a gzip process isn't created, or if it is, it doesn't appear in the Task Manager. 3. Are there any troubleshooting processes that I'm missing? As a side note, I've got a script that uses nslookup, so I know that my server supports wscript. I've also placed the gzip.exe file in the same location as nslookup.exe in hopes that it was a folder access issue. Comparing the permissions between nslookup.exe and gzip.exe shows that they are set the same. I just don't know why gzip isn't decompressing the file. Hopefully I posted to the correct forum for this; It appears active. Any advice is appreciated. Thanks...
|
|