Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating Script #1

Open
AuraProgramming opened this issue Jun 2, 2021 · 7 comments
Open

Updating Script #1

AuraProgramming opened this issue Jun 2, 2021 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers idea Post ideas for the application try this on Edit the code, then share it!

Comments

@AuraProgramming
Copy link

@echo off echo Would you like to install the update? Y/N choice /c yn /n if %ERRORLEVEL% 1 goto install if %ERRORLEVEL% 2 goto cancel :install powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/GabiBrawl/Bat-Chat/Application/Chat.cmd" - Outfile %temp%\Chat.cmd del /q %USERPROFILE%\Downloads\Chat.cmd move "%temp%\Chat.cmd" "%USERPROFILE%\Downloads" echo Update Successful! :cancel cls cancelling timeout /t 1 > nul exit

@AuraProgramming
Copy link
Author

Format was weird, hopefully you can understand that.

@AuraProgramming
Copy link
Author

AuraProgramming commented Jun 2, 2021

I also don't see where it is supposed to send the file through google drive, would you mind pointing it out for me?

@GabiBrawl
Copy link
Owner

You have to download the chat program, then install google drive (I used google drive but I think other drives may work too). Copy the chat program to a folder in your drive, the run it. (I will try to use an api to remove the drive dependency)

It is still in development, all this confusion will disappear in the next versions (I hope)

@GabiBrawl
Copy link
Owner

@echo off echo Would you like to install the update? Y/N choice /c yn /n if %ERRORLEVEL% 1 goto install if %ERRORLEVEL% 2 goto cancel :install powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/GabiBrawl/Bat-Chat/Application/Chat.cmd" - Outfile %temp%\Chat.cmd del /q %USERPROFILE%\Downloads\Chat.cmd move "%temp%\Chat.cmd" "%USERPROFILE%\Downloads" echo Update Successful! :cancel cls cancelling timeout /t 1 > nul exit

But... how will my program detect if there is a new update or not?

@GabiBrawl GabiBrawl added the enhancement New feature or request label Jun 2, 2021
@GabiBrawl GabiBrawl pinned this issue Jun 2, 2021
@AuraProgramming
Copy link
Author

What you can do is make a .version file, and inside it put the version. Then make the updater check if the numbers are the same using something like this
@echo off powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/GabiBrawl/Bat-Chat/Application/Version.ver" - Outfile %temp%\Version.ver if "%temp%\Version.ver"=="https://raw.githubusercontent.com/GabiBrawl/Bat-Chat/Application/Version.ver" do ( echo Would you like to install the update? Y/N choice /c yn /n if %ERRORLEVEL% 1 goto install if %ERRORLEVEL% 2 goto cancel :install powershell Invoke-WebRequest -Uri "https://raw.githubusercontent.com/GabiBrawl/Bat-Chat/Application/Chat.cmd" - Outfile %temp%\Chat.cmd del /q %USERPROFILE%\Downloads\Chat.cmd move "%temp%\Chat.cmd" "%USERPROFILE%\Downloads" echo Update Successful! :cancel cls cancelling timeout /t 1 > nul exit

@AuraProgramming
Copy link
Author

Format was again screwed up by GitHub.

@GabiBrawl GabiBrawl added good first issue Good for newcomers idea Post ideas for the application try this on Edit the code, then share it! labels Jun 13, 2021
@connorslade
Copy link

The formatting was probably messed up because you use '`' to start and end your code block. For a multi line code block, try using '```'

This is a
Multi Line
Code Block

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers idea Post ideas for the application try this on Edit the code, then share it!
Projects
None yet
Development

No branches or pull requests

3 participants