hi all,
i want to have Updater in my project. i wrote these codes but i have error.
First my app download zip file which has bin, conf, legal, lib And exe files. then my app extract this zip file to 'update' Folder. then Run These codes.
These codes first create a bat file. And open the file. Then close the application. It then deletes the previous application. And then moves the new application And opens.
but i have error
Did not delete any files. And did not convey anything.
The bat file is correct.
Sometimes it works fine when I open the bat file myself.
and show me
what should i do?
i want to have Updater in my project. i wrote these codes but i have error.
First my app download zip file which has bin, conf, legal, lib And exe files. then my app extract this zip file to 'update' Folder. then Run These codes.
B4J code:
File.WriteString(Codes.Get_FileDir,"Updater.bat",$"@ echo off <-There is no space between @ and echo.
title Updater of Application
echo Please wait. Application is updating...
timeout /t 3
Rmdir /S /Q bin
Rmdir /S /Q conf
Rmdir /S /Q legal
Rmdir /S /Q lib
del /F /Q Panel.exe
xcopy /e update
Rmdir /S /Q update
start "" Panel.exe
del Updater.bat"$)
Sleep(1000)
fx.ShowExternalDocument(File.GetUri(Codes.Get_FileDir,"Updater.bat"))
Sleep(10)
ExitApplication
These codes first create a bat file. And open the file. Then close the application. It then deletes the previous application. And then moves the new application And opens.
but i have error
Did not delete any files. And did not convey anything.
The bat file is correct.
Sometimes it works fine when I open the bat file myself.
and show me
Please wait. Application is updating...
Waiting for 0 seconds, press a key to continue ...
update\Panel.exe
update\bin\api-ms-win-core-console-l1-1-0.dll
update\bin\api-ms-win-core-datetime-l1-1-0.dll
update\bin\api-ms-win-core-debug-l1-1-0.dll
update\bin\api-ms-win-core-errorhandling-l1-1-0.dll
update\bin\api-ms-win-core-file-l1-1-0.dll
update\bin\api-ms-win-core-file-l1-2-0.dll
update\bin\api-ms-win-core-file-l2-1-0.dll
update\bin\api-ms-win-core-handle-l1-1-0.dll
update\bin\api-ms-win-core-heap-l1-1-0.dll
update\bin\api-ms-win-core-interlocked-l1-1-0.dll
update\bin\api-ms-win-core-libraryloader-l1-1-0.dll
update\bin\api-ms-win-core-localization-l1-2-0.dll
update\bin\api-ms-win-core-memory-l1-1-0.dll
update\bin\api-ms-win-core-namedpipe-l1-1-0.dll
update\bin\api-ms-win-core-processenvironment-l1-1-0.dll
update\bin\api-ms-win-core-processthreads-l1-1-0.dll
update\bin\api-ms-win-core-processthreads-l1-1-1.dll
update\bin\api-ms-win-core-profile-l1-1-0.dll
update\bin\api-ms-win-core-rtlsupport-l1-1-0.dll
update\bin\api-ms-win-core-string-l1-1-0.dll
update\bin\api-ms-win-core-synch-l1-1-0.dll
update\bin\api-ms-win-core-synch-l1-2-0.dll
update\bin\api-ms-win-core-sysinfo-l1-1-0.dll
update\bin\api-ms-win-core-timezone-l1-1-0.dll
update\bin\api-ms-win-core-util-l1-1-0.dll
update\bin\api-ms-win-crt-conio-l1-1-0.dll
update\bin\api-ms-win-crt-convert-l1-1-0.dll
update\bin\api-ms-win-crt-environment-l1-1-0.dll
update\bin\api-ms-win-crt-filesystem-l1-1-0.dll
update\bin\api-ms-win-crt-heap-l1-1-0.dll
update\bin\api-ms-win-crt-locale-l1-1-0.dll
update\bin\api-ms-win-crt-math-l1-1-0.dll
update\bin\api-ms-win-crt-multibyte-l1-1-0.dll
update\bin\api-ms-win-crt-private-l1-1-0.dll
update\bin\api-ms-win-crt-process-l1-1-0.dll
update\bin\api-ms-win-crt-runtime-l1-1-0.dll
update\bin\api-ms-win-crt-stdio-l1-1-0.dll
update\bin\api-ms-win-crt-string-l1-1-0.dll
update\bin\api-ms-win-crt-time-l1-1-0.dll
update\bin\api-ms-win-crt-utility-l1-1-0.dll
update\bin\awt.dll
update\bin\decora_sse.dll
update\bin\fontmanager.dll
update\bin\freetype.dll
update\bin\fxplugins.dll
update\bin\glass.dll
update\bin\glib-lite.dll
update\bin\gstreamer-lite.dll
update\bin\j2gss.dll
update\bin\java.dll
update\bin\java.exe
update\bin\javafx_font.dll
update\bin\javafx_iio.dll
update\bin\javajpeg.dll
update\bin\javaw.exe
update\bin\jawt.dll
update\bin\jfxmedia.dll
update\bin\jimage.dll
update\bin\jli.dll
update\bin\jrunscript.exe
update\bin\jsound.dll
update\bin\keytool.exe
update\bin\kinit.exe
update\bin\klist.exe
update\bin\ktab.exe
update\bin\lcms.dll
update\bin\mlib_image.dll
update\bin\msvcp140.dll
update\bin\net.dll
update\bin\nio.dll
update\bin\Panel.exe
update\bin\prefs.dll
update\bin\prism_common.dll
update\bin\prism_d3d.dll
update\bin\prism_sw.dll
update\bin\release_java_modules.txt
update\bin\splashscreen.dll
update\bin\sunec.dll
update\bin\ucrtbase.dll
update\bin\vcruntime140.dll
update\bin\verify.dll
update\bin\w2k_lsa_auth.dll
update\bin\zip.dll
update\bin\server\jvm.dll
update\conf\logging.properties
update\conf\net.properties
update\conf\sound.properties
update\conf\security\java.policy
update\conf\security\java.security
update\conf\security\policy\README.txt
update\conf\security\policy\limited\default_local.policy
update\conf\security\policy\limited\default_US_export.policy
update\conf\security\policy\limited\exempt_local.policy
update\conf\security\policy\unlimited\default_local.policy
update\conf\security\policy\unlimited\default_US_export.policy
update\legal\java.base\ADDITIONAL_LICENSE_INFO
update\legal\java.base\aes.md
update\legal\java.base\asm.md
update\legal\java.base\ASSEMBLY_EXCEPTION
update\legal\java.base\c-libutl.md
update\legal\java.base\cldr.md
update\legal\java.base\icu.md
update\legal\java.base\LICENSE
update\legal\java.base\public_suffix.md
update\legal\java.base\unicode.md
update\legal\java.base\zlib.md
update\legal\java.datatransfer\ADDITIONAL_LICENSE_INFO
update\legal\java.datatransfer\ASSEMBLY_EXCEPTION
update\legal\java.datatransfer\LICENSE
update\legal\java.desktop\ADDITIONAL_LICENSE_INFO
update\legal\java.desktop\ASSEMBLY_EXCEPTION
update\legal\java.desktop\colorimaging.md
update\legal\java.desktop\freetype.md
update\legal\java.desktop\giflib.md
update\legal\java.desktop\harfbuzz.md
update\legal\java.desktop\jpeg.md
update\legal\java.desktop\lcms.md
update\legal\java.desktop\libpng.md
update\legal\java.desktop\LICENSE
update\legal\java.desktop\mesa3d.md
update\legal\java.desktop\opengl.md
update\legal\java.logging\ADDITIONAL_LICENSE_INFO
update\legal\java.logging\ASSEMBLY_EXCEPTION
update\legal\java.logging\LICENSE
update\legal\java.naming\ADDITIONAL_LICENSE_INFO
update\legal\java.naming\ASSEMBLY_EXCEPTION
update\legal\java.naming\LICENSE
update\legal\java.prefs\ADDITIONAL_LICENSE_INFO
update\legal\java.prefs\ASSEMBLY_EXCEPTION
update\legal\java.prefs\LICENSE
update\legal\java.scripting\ADDITIONAL_LICENSE_INFO
update\legal\java.scripting\ASSEMBLY_EXCEPTION
update\legal\java.scripting\LICENSE
update\legal\java.security.jgss\ADDITIONAL_LICENSE_INFO
update\legal\java.security.jgss\ASSEMBLY_EXCEPTION
update\legal\java.security.jgss\LICENSE
update\legal\java.security.sasl\ADDITIONAL_LICENSE_INFO
update\legal\java.security.sasl\ASSEMBLY_EXCEPTION
update\legal\java.security.sasl\LICENSE
update\legal\java.xml\ADDITIONAL_LICENSE_INFO
update\legal\java.xml\ASSEMBLY_EXCEPTION
update\legal\java.xml\bcel.md
update\legal\java.xml\dom.md
update\legal\java.xml\jcup.md
update\legal\java.xml\LICENSE
update\legal\java.xml\xalan.md
update\legal\java.xml\xerces.md
update\legal\java.xml.crypto\ADDITIONAL_LICENSE_INFO
update\legal\java.xml.crypto\ASSEMBLY_EXCEPTION
update\legal\java.xml.crypto\LICENSE
update\legal\java.xml.crypto\santuario.md
update\legal\javafx.base\ADDITIONAL_LICENSE_INFO
update\legal\javafx.base\ASSEMBLY_EXCEPTION
update\legal\javafx.base\LICENSE
update\legal\javafx.controls\ADDITIONAL_LICENSE_INFO
update\legal\javafx.controls\ASSEMBLY_EXCEPTION
update\legal\javafx.controls\LICENSE
update\legal\javafx.fxml\ADDITIONAL_LICENSE_INFO
update\legal\javafx.fxml\ASSEMBLY_EXCEPTION
update\legal\javafx.fxml\LICENSE
update\legal\javafx.graphics\ADDITIONAL_LICENSE_INFO
update\legal\javafx.graphics\ASSEMBLY_EXCEPTION
update\legal\javafx.graphics\jpeg_v7.md
update\legal\javafx.graphics\LICENSE
update\legal\javafx.media\ADDITIONAL_LICENSE_INFO
update\legal\javafx.media\applecoreaudio.md
update\legal\javafx.media\ASSEMBLY_EXCEPTION
update\legal\javafx.media\glib.md
update\legal\javafx.media\gstreamer.md
update\legal\javafx.media\libffi.md
update\legal\javafx.media\LICENSE
update\legal\javafx.swing\ADDITIONAL_LICENSE_INFO
update\legal\javafx.swing\ASSEMBLY_EXCEPTION
update\legal\javafx.swing\LICENSE
update\legal\jdk.charsets\ADDITIONAL_LICENSE_INFO
update\legal\jdk.charsets\ASSEMBLY_EXCEPTION
update\legal\jdk.charsets\LICENSE
update\legal\jdk.crypto.ec\ADDITIONAL_LICENSE_INFO
update\legal\jdk.crypto.ec\ASSEMBLY_EXCEPTION
update\legal\jdk.crypto.ec\ecc.md
update\legal\jdk.crypto.ec\LICENSE
update\legal\jdk.jsobject\ADDITIONAL_LICENSE_INFO
update\legal\jdk.jsobject\ASSEMBLY_EXCEPTION
update\legal\jdk.jsobject\LICENSE
update\legal\jdk.unsupported\ADDITIONAL_LICENSE_INFO
update\legal\jdk.unsupported\ASSEMBLY_EXCEPTION
update\legal\jdk.unsupported\LICENSE
update\legal\jdk.unsupported.desktop\ADDITIONAL_LICENSE_INFO
update\legal\jdk.unsupported.desktop\ASSEMBLY_EXCEPTION
update\legal\jdk.unsupported.desktop\LICENSE
update\legal\jdk.xml.dom\ADDITIONAL_LICENSE_INFO
update\legal\jdk.xml.dom\ASSEMBLY_EXCEPTION
update\legal\jdk.xml.dom\LICENSE
update\lib\classlist
update\lib\fontconfig.bfc
update\lib\fontconfig.properties.src
update\lib\javafx-swt.jar
update\lib\javafx.properties
update\lib\jawt.lib
update\lib\jrt-fs.jar
update\lib\jvm.cfg
update\lib\jvm.lib
update\lib\modules
update\lib\psfont.properties.ja
update\lib\psfontj2d.properties
update\lib\tzdb.dat
update\lib\tzmappings
update\lib\security\blacklisted.certs
update\lib\security\cacerts
update\lib\security\default.policy
update\lib\security\public_suffix_list.dat
update\lib\server\Xusage.txt
213 File(s) copied
what should i do?
Attachments
Last edited: