Solved

Trap error in DOS Window or Capture Window Contents

Posted on 2014-03-26
8
555 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
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 9

Accepted Solution

by:
rfportilla earned 250 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pdf to excel 8 71
laserjet printer error 10 44
Application timeout 4 46
Graphics Rendering through Remote Desktop 11 30
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
How to record audio from input sources to your PC – connected devices, connected preamp to record vinyl discs, streaming media, that play through your audio card: Vista, Windows 7, Windows 8, Windows 8.1 and Windows 10 – both 32 bit & 64.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

730 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