Jump to content

make GUI Batch Installation by WizApp?


sonoop

Recommended Posts

Dear Everrybody!

My application is a file *.7z. My working's extract *.7z to driver D:\ of my computer with a *.bat. And I wanna build a GUI for this batch with WizApp.exe (application support to build GUI BATCH). I writed code for bat file, but I have a problem with process bar (PB in Wizapp).

I want open windown process bar while extract file *.7z and process bar update percentage completed untill processing's finish. And then it's colse this windown process bar.

Plz help me!

Here code batch file:


@ECHO OFF
set wasig=Copyright @ 2011 FBS Company
:page_start
wizapp SPLASH OPEN
start /w wizapp SPLASH CLOSE
:page1
set watitle=setup XMAN ERP v1.0
set watext=~~~~~~~Ban co muon cai dat phan mem XMAN ERP v1.0 khong?
set wabmp=xman.bmp

start /w wizapp noback TB
if errorlevel 2 goto :end
if not exist C:\xman goto :page_package
:page2
set watext=~~~~~~~Chuong trinh da cai san tu truoc roi! Ban co muon cai de len ban cu khong?~~Notes: ~ - Nhan Next de tiep tuc viec cai dat. ~ - Nhan Cancel de huy bo.

start /w wizapp TB
if errorlevel 2 goto :end
if errorlevel 1 goto :page1
:page_package
set watitle=Choise installation's package.
set watext=~~~~~~~Xin vui long chon goi phan mem can cai dat:
set wainput=^&Server package;^&Client package
set waoutnum=0
set wabat=%TEMP%\wabat.bat

start /w wizapp RB
if errorlevel 2 goto :end
if errorlevel 1 goto :page2
call %wabat%
if "%waoutnum%" == "0" echo you choise ser
if "%waoutnum%" == "1" echo you choise client
:page_wait
set watitle=wait processing....
set watext=~~~~~~Xin vui long doi cho chut lat de he thong tu dong cai dat phan mem vao may tinh cua ban.
set wabat=%TEMP%\wabat.bat
start /w wizapp PB OPEN
if errorlevel 2 goto :end
call %wabat%
7z x def.7z -aoa -o"D:\"
for %%a in (%waoutnum%) start /w wizapp PB UPDATE 5

:page_finish
set watitle=installation finished
set watext=~~~~~~~Cam on ban da tin dung san pham phan mem cua chung toi.
wizapp.exe NOCANCEL NOBACK FINISH TB
if errorlevel 0 goto :exit
:end
page=:end
set watitle=stop installation...
set watext=Ban muon dung viec cai dat khong?~~Notes:~ - nhan ok de dung.~ - nhan cancel de huy bo lenh.
start /w wizapp MB QUES
if errorlevel 1 goto :page1
if errorlevel 2 goto :exit
:exit
start /w wizapp PB CLOSE

Edited by sonoop
Link to comment
Share on other sites


@ Jalaz: sorry, i dont speak english verry well.

My mean is "How use PB of wizapp.exe?" I want to use PB of wizapp to build a GUI (windown waitting/ process bar) while time-processing of the unpacking (unzip a file def.7z). But I cant build it, can you help me?

Edited by sonoop
Link to comment
Share on other sites

Now I see.

The actual PB (Progress Bar) is NOT what you think (i.e. a "real" progress bar) :w00t:.

Batch processing is sequential, once you have started 7zip, "focus" or actual "execution" won't return to the batch backed Wizapp until 7zip finishes.

To understand what PB does, imagine that you prepare 5 bitmaps of a progress bar:

  1. progress bar at 0%
  2. progress bar at 25%
  3. progress bar at 50%
  4. progress bar at 75%
  5. Progress bar at 100%

Than you have code (pseudo-code, actually) like:

SHOW bitmap #1
RUN a command
Show bitmap #2
RUN a command
Show bitmap #3
RUN a command
Show bitmap #4
RUN a command
Show bitmap #5

Now, replacing the "SHOW bitmap" with PB, you would have:

Wizapp PB OPEN
RUN a command
Wizapp PB UPDATE 25
RUN a command
Wizapp PB UPDATE 50
RUN a command
Wizapp PB UPDATE 75
RUN a command
Wizapp PB UPDATE 100

What you can do (at the most) in your case is:

Wizapp PB OPEN
7z x def.7z -aoa -o"D:\"
Wizapp PB UPDATE 100

(pretty much unuseful :ph34r:)

I hope you understand the issue.

jaclaz

Link to comment
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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...