Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7921565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T16:37:40+00:00 2026-06-03T16:37:40+00:00

When I run the following command from command line, I can run 7-zip as

  • 0

When I run the following command from command line, I can run 7-zip as a remote user and extract a file to a network share:

C:\PsExec.exe -u username -p password "C:\7z.exe" x -y -o\\network\extractedfiles\ C:\compressed.zip toextract.txt

I am running this generated line exactly as my application is running it (note I’ve altered the directories, paths, username, and passwords so that I can post it online). In fact, the line was copied from my application’s logs.

But for some reason, when I run this command from Java using the following code, it sits and waits forever. No file appears on the “\network\extractedfiles\” path.

final Process copyFile = Runtime.getRuntime().exec( cmd );
final int exit = copyFile.waitFor();

Where cmd is the above string. Any ideas?

More Info 1:

I also meant to say that I noticed when this is run by command line, psexec launches z-zip in a separate command window. Could the problem be that the output from zip is not being disposed of? I tried closing the input stream but it did not seem to fix the problem I’m facing.

More Info 2:

I tried logging out output from the command, and here is what I got:

INFO 2012-05-03 15:07:55,188 - Command output: PsExec v1.98 - Execute processes remotely
INFO 2012-05-03 15:07:55,188 - Command output: Copyright (C) 2001-2010 Mark Russinovich
INFO 2012-05-03 15:07:55,188 - Command output: Sysinternals - www.sysinternals.com
INFO 2012-05-03 15:07:55,188 - Command output: 

Then it sits forever. When run on the command line the next line of output was:

C:\7z.exe exited with error code 0.

So it seems 7-zip is hanging. It does not even begin to extract the file though – when I check the directory where the file is expected to extract to nothing appears.

More Info 3:

I created my own unzipper in .net using the ionic.zip.dll. My unzipper was really simple – accepted params through command line, did not have any output. But it still did the exact same thing – unzipping does not start and the execution hangs. Maybe psexec is doing something weird??? Does the fact that psexec wants to run the unzipper in an external command console cause any problems for Java?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T16:37:42+00:00Added an answer on June 3, 2026 at 4:37 pm

    Probably there was an error you should read the streams from your process to know for sure

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can run an svn command from the command line but not from within
I am trying to run a java program from command line. I tried following
I ran a MySQL query from command line using the following: nohup mysql --user=root
I want to run the following command from a C program to read the
I have the following problem: I have to run commands on remote servers from
I run the following command in Emacs unsuccessfully C-u How can you clear the
How can I run the following command using subprocess.Popen ? mysqldump database_name table_name |
I am attempting to run VLCJ test jar from command line. VLCJ requires two
Is there any way how I can run two Db2 commands from a command
I tried to run the following command and it says there is nothing to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.