?
Solved

Trap error in DOS Window or Capture Window Contents

Posted on 2014-03-26
8
Medium Priority
?
559 Views
Last Modified: 2014-04-10
Hi,

I have an install program that I am trying to run. The install seems to fire up a command prompt window to do the beginnings of its install. There seems to be an error that occurs in that script and the DOS window exits and disappears before I can see what the error is. I bet the error it is something small and fixable but I am quite unable to figure out a way to redirect or capture the error so that I can read it. Any help would be appreciated.

enee
0
Comment
Question by:Enee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 9

Expert Comment

by:rfportilla
ID: 39957141
Don't know without much more detail.  If the install program is just running a script, you might be able to find the script in the same folder as the install.  Or you might be able to extract that script from the executable.  

In either case, the easiest thing is probably to find that script and start it from within a command prompt.  

Before you go this route, you might try running the install in compatibility mode, if you haven't already.  

Good luck.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39957234
agreed with above.  i would try right click, run as admin first, then start command prompt, cd /d to drive containing install and run it from thee.  quite poss will see the output then if it doesnt start a new window.
0
 

Author Comment

by:Enee
ID: 39957255
Master,

Ok, maybe I am running you down a path that is completely wrong.... I don't think I should have posted that the install is running a "script", at second look I would say that install itself it "calling" another program of sorts or it trying to execute something and failing in the process.

Ace,

Ya I tried all of that... The installer does start a second window. That's really the problem, I am trying to trap the output or stop the processing of a second window.
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
LVL 9

Accepted Solution

by:
rfportilla earned 1000 total points
ID: 39957674
FYI, Master and Ace are EE certifications, not our names.  ;-)  I am rfportilla and the Ace is Enee.  

Even still, the installer is calling something that is trying to run in a command window.   There are several ways this could happen.  Looking for a script was one of the easier things to try.  

Extracting files from an .exe is usually pretty easy.  Download a zip program like 7 zip or pea zip and they will let you go into the .exe like a zip file (usually).  If there is a bat file or something similar, that may be your script.  

Another option is that it is running a jar file.  If this is the case, you can find the jar file and run it with java in debug mode.  

At this point, are you sure that there is an error in the script?  Also, have you checked logs?  There might be a windows event log or install log in the directory with the installer.  

And I didn't hear anything about compatibility mode, which is different from run as admin, but that might be another option, too.  The other suggestion that Enee made about making sure you are in the directory with the installer may make a difference also.  

Otherwise, without knowing more, it's difficult to say more.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39957708
Unless this is an in-house app it is probably worth posting details about it too.  Process Monitor and process Explorer are two good ways of seeing what is being accessed, what errors there are etc.  You run them, then set your installer off and everything that is happening is recorded and you can scroll throuhg.  Normally a LOT is going on so filter down to certain exe's etc. but has helped tracked down silly stuff like registry permission errors and the like before.

Steve
0
 
LVL 11

Expert Comment

by:paultomasi
ID: 39963224
Have you tried the following:

CMD /K install.exe
Where 'install.exe' is the name of your installation program.

Go to [Menu] [Run] and enter the above command including the installation file's full path. For example:

CMD /K "C:\Documents and Settings\User\Downloads\Install.exe"
Of course, you will need to know the full path of your own installation program for it to work properly.
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 39963284
Morning Paul, haven-t seen ypur name around here for a while!
0
 

Author Closing Comment

by:Enee
ID: 39992807
Sorry for running away from this question for so long. Turns out the install program is written poorly ..... it doesn't tell you it finished its install successfully! It just fades away to where dos prompts go when they die. I found this all out by following the diagnostic suggestions from the selected answer by  rfportilla.

Thanks to all for the help!
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question