Solved

Trap error in DOS Window or Capture Window Contents

Posted on 2014-03-26
8
552 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
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
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…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

777 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