[izpack-users] stage: uninstall - running bat-file witharguments

miraodb miraodb at hotmail.com
Sat Nov 4 03:24:47 CET 2006


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
>
> _______________________________________________
> izpack-users mailing list
> izpack-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-users
>
> 




More information about the izpack-users mailing list