Solved

Trap error in DOS Window or Capture Window Contents

Posted on 2014-03-26
8
546 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
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 9

Expert Comment

by:rfportilla
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 9

Accepted Solution

by:
rfportilla earned 250 total points
Comment Utility
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 43

Expert Comment

by:Steve Knight
Comment Utility
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
Comment Utility
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
Comment Utility
Morning Paul, haven-t seen ypur name around here for a while!
0
 

Author Closing Comment

by:Enee
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Several part series to implement Internet Explorer 11 Enterprise Mode
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
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…
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now