[izpack-users] stage: uninstall - running bat-file with arguments

J-Pro joker.pro at gmail.com
Sat Nov 4 21:18:36 CET 2006


Good evening, miraodb.

Really, it could be a mistake. At least I know why bat-file was not 
outputted into the file. I just forgot to change > to >, really. But 
thanks for your help, I really didn't knew what to do.

I just tried to run corrected bat-file, it didn't help :(

I just changed this part as you've advised:

<executable targetfile="uninstall.bat" stage="uninstall" os="windows">
  <arg>$catalinaServiceName</arg>
  <arg>$catalinaServiceName</arg>
  <arg>$postgreInstallFolder</arg>
  <arg>$TOMSScelDelFilename</arg>
  <arg>$postgreUser</arg>
  <arg>$postgreServiceName</arg>
  <arg>$postgreServiceName</arg>
  <arg>&gt;&gt;</arg>
  <arg>C:\T_INSTALL.log</arg>
</executable>


And after I run uninstall, It just asked me: "Do you want to continue?", I 
answered yes and it removed my webapp, after what I just pressed the Quit 
button on uninstall dialog window.


Where can there be a problem?


Thanks a lot in advance!




----- Original Message ----- 

> From: "miraodb" <miraodb at hotmail.com>
> Subject: Re: [izpack-users] stage: uninstall - running bat-file
> witharguments
> To: <izpack-users at lists.berlios.de>
> Message-ID: <000d01c6ffb8$6ff4fe30$0202a8c0 at fabport1>
> Content-Type: text/plain; format=flowed; charset="iso-8859-1";
> reply-type=original
>
> Hi,
>
> I might be wrong but don't you have a >> in your xml ???
> If that's the case it's wrong. You should use the entities instead.
>
> Here is what i think the solution:
>
> <executable targetfile="uninstall.bat" stage="uninstall" os="windows">
>   <arg>$catalinaServiceName</arg>
>   <arg>$catalinaServiceName</arg>
>   <arg>$postgreInstallFolder</arg>
>   <arg>$TOMSScelDelFilename</arg>
>   <arg>$postgreUser</arg>
>   <arg>$postgreServiceName</arg>
>   <arg>$postgreServiceName</arg>
>   <arg>&gt;&gt;</arg>
>   <arg>C:\T_INSTALL.log</arg>
> </executable>
>
> I might be wrong but worth to try.
>
> Cheers,
> Fabrice
>
> ----- Original Message ----- 
> From: "J-Pro" <joker.pro at gmail.com>
> To: <izpack-users at lists.berlios.de>
> Sent: Tuesday, October 31, 2006 8:07 AM
> Subject: Re: [izpack-users] stage: uninstall - running bat-file
> witharguments
>
>
>> Good day dear IzPack gurus.
>>
>> Sorry for disturbing you again, but is my problem really insoluble? I
>> really
>> need your help... The one way to make my task, as I see now, is to change
>> some IzPack code. But I'm sure that there is a way to make it with
>> bat-files. I just can't get into what happens below:
>>
>> ----- Original Message ----- 
>>
>>> From: J-Pro <joker.pro at gmail.com>
>>> Subject: [izpack-users] stage: uninstall - running bat-file with
>>> arguments
>>> To: "Iz Pack" <izpack-users at lists.berlios.de>
>>> Message-ID: <000701c6fa54$99867300$8d00a8c0 at Dev2>
>>> Content-Type: text/plain; format=flowed; charset="windows-1251";
>>> reply-type=original
>>>
>>> Good afternoon, IzPack gurus.
>>>
>>> I'm trying to uninstall some services from my bat-file, but I run it 
>>> from
>>> uninstaller.
>>> I've just added these strings in install.xml:
>>>
>>>  <executable targetfile="uninstall.bat" stage="uninstall" os="windows">
>>>    <arg>$catalinaServiceName</arg>
>>>    <arg>$catalinaServiceName</arg>
>>>    <arg>$postgreInstallFolder</arg>
>>>    <arg>$TOMSScelDelFilename</arg>
>>>    <arg>$postgreUser</arg>
>>>    <arg>$postgreServiceName</arg>
>>>    <arg>$postgreServiceName</arg>
>>>    <arg>>></arg>
>>>    <arg>C:\T_INSTALL.log</arg>
>>>  </executable>
>>>
>>> ">> C:\T_INSTALL.log"  is specified because I want to see bat output
>>> somewhere.
>>>
>>> With these strings when uninstall starts and I press "Uninstall" button,
>>> the
>>> dialog appears asking me "Continue?". I assume that this dialog appears
>>> because my bat-files fails to execute and waits for some input. So I 
>>> just
>>> want to see the error in it. So when I press "Yes" - it uninstalls
>>> everything I need except things in the bat-file. And of course there is
>>> no
>>> file C:\T_INSTALL.log created . :(  I don't know why....
>>>
>>>
>>> Here is my bat-file(strings like echo 1 $catalinaServiceName are for me,
>>> just to know arguments order):
>>>
>>> @echo off
>>>
>>> echo ============================= START
>>> echo ---------------- stopping and disabling Tomcat service
>>> echo 1 $catalinaServiceName
>>> echo 2 $catalinaServiceName
>>> sc stop %1
>>> sc config %2 start=disabled
>>> echo ---------------- deleting TOMS DB
>>> echo Run data script to delete all TOMS data (DB, tables, functions,
>>> etc.)
>>> echo psql.exe -f TOMSskel.sql -U tomsUser
>>> echo ..
>>> echo 3 $postgreInstallFolder
>>> echo 4 $TOMSScelDelFilename
>>> echo 5 $postgreUser
>>> echo
>>> echo
>>> echo
>>> %3/bin/psql -f %4 -U %5
>>> echo ---------------- stopping and disabling PostgreSQL service
>>> echo 6 $postgreServiceName
>>> echo 7 $postgreServiceName
>>> echo
>>> echo
>>> sc stop %6
>>> sc config %7 start=disabled
>>> echo ============================= END
>>>
>>> Here are my variables:
>>>
>>>        <variable name="catalinaServiceName" value="Tomcat5"/>
>>>        <variable name="postgreInstallFolder" value="C:\Program
>>> Files\PostgreSQL\8.1"/>
>>>        <variable name="TOMSScelDelFilename" value="TOMSskelDel.sql"/>
>>>        <variable name="postgreUser" value="postgres"/>
>>>        <variable name="postgreServiceName" value="pgsql-8.1"/>
>>>
>>>
>>> I see that I've passed one variable for two times. But I think there 
>>> will
>>> be
>>> no error because of this reason.
>>>
>>>
>>> And one more thing: maybe you wonder why didn't I call "sc" with
>>> arguments
>>> from install.xml via <executable/> - I'll explain. I did it. But when
>>> uninstall starts and I press "Uninstall", it just hangs up because of
>>> sc.exe
>>> waiting for some data. I saw it in processes.
>>>
>>> Here is the code I used for calling sc and other stuff from xml:
>>>
>>>     <!-- stopping and disabling Tomcat service -->
>>>     <executable targetfile="sc" stage="uninstall" os="windows">
>>>  <arg>stop</arg>
>>>  <arg>$catalinaServiceName</arg>
>>>     </executable>
>>>
>>>     <executable targetfile="sc" stage="uninstall" os="windows">
>>>  <arg>config</arg>
>>>  <arg>$catalinaServiceName</arg>
>>>  <arg>start=</arg>
>>>  <arg>disabled</arg>
>>>     </executable>
>>>
>>>     <!-- deleting TOMS DB -->
>>>     <executable targetfile="$postgreInstallFolder/bin/psql"
>>> stage="uninstall" os="windows">
>>>            <!-- Run data script to delete all TOMS data (DB, tables,
>>> functions, etc.) -->
>>>            <!-- psql.exe -f TOMSskel.sql -U tomsUser -->
>>>  <arg>-f</arg>
>>>  <arg>$TOMSScelDelFilename</arg>
>>>  <arg>-U</arg>
>>>  <arg>$postgreUser</arg>
>>>        </executable>
>>>
>>>     <!-- stopping and disabling PostgreSQL service -->
>>>     <executable targetfile="sc" stage="uninstall" os="windows">
>>>  <arg>stop</arg>
>>>  <arg>$postgreServiceName</arg>
>>>     </executable>
>>>
>>>     <executable targetfile="sc" stage="uninstall" os="windows">
>>>  <arg>config</arg>
>>>  <arg>$postgreServiceName</arg>
>>>  <arg>start=</arg>
>>>  <arg>disabled</arg>
>>> </executable>
>>>
>>>
>>> Please, help me to solve this problem...  Thank you very much in 
>>> advance.
>>>
>>>
>>> P.S.: "The data in this mail is absolutely the same with mine I've
>>> tested."





________________________________
With respect,

Yurii Kartsev,
Soft IT 




More information about the izpack-users mailing list