Sign in to follow this  
Followers 0
cbertram68

Getting an uninstall program written in Java to run.

5 posts in this topic

First off I am trying to run this from SMS, and as the system account, both of these could be the issue. Here is what I am seeing:

If I am logged in as admin, and run this command line the application does what it is supposed to do , and allows me to do the uninstall.

java -cp .\sas.tools.suw.jar;.\sas.tools.deploymntreg.jar;.\sas.tools.deployjni.jar;.\sas.tools.viewregistry.jar;.\log4j.jar com.sas.tools.suw.SUW -v

I tried plugging this command line in as is in a run wait command, and found I was not getting anything to happen, so I added the full path for everything, so in AutoIt the command line looks like this:

RunWait("java -cp" & "c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.suw.jar;c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.deploymntreg.jar;c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.deployjni.jar;c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.viewregistry.jar;c:\program files\sasuninstallwizard\uninstallwizard\log4j.jar com.sas.tools.suw.SUW -v", "c:\program files\sasuninstallwizard\uninstallwizard\")

When I run it this way, I get a command prompt that runs for a split second, not long enough to read what it is reporting or any errors, and then it just goes away. I have been trying several different ways to get this to work, but with pretty much the same result, command prompt on screen for a split second, then nothing. Any help on how to get a Java applet to run would be greatly appreciated.

Share this post


Link to post
Share on other sites



try using ShellExecuteWait() or RunWait(@comspec & " /c java ...........") to ensure the Path settings are used to find java.exe.


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Same result.

ShellExecuteWait("java.exe", "-cp c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.suw.jar;c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.deploymntreg.jar;c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.deployjni.jar;c:\program files\sasuninstallwizard\uninstallwizard\sas.tools.viewregistry.jar;c:\program files\sasuninstallwizard\uninstallwizard\log4j.jar com.sas.tools.suw.SUW -v", "c:\program files\sasuninstallwizard\uninstallwizard\")

command prompt quick flash, then nothing.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

try it with the original command line and use this format so the CMD window stays open and you can see the error.

RunWait(@comspec & " /k java -cp .sas.tools.suw.jar;.sas.tools.deploymntreg.jar;.sas.tools.deployjni.jar;.sas.tools.viewregistry.jar;.log4j.jar com.sas.tools.suw.SUW -v")T

Edited by Jos

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

That did it, I was getting an error about it trying to run the cmd.exe with a UNC path, but then I added the wroking dir, and it kicked off.

I knew about the /c for @comspec, but I was looking all over the help file for anything that would allow me to keep the command line open. /k worked like a charm.

Thank you very much for your help.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0