MC4Y Productivity Suite – Installation on Windows
=================================================

Free software (GPL-3.0-or-later) from MY COACHING FOR YOU. German version: LIESMICH.txt
The complete guide for all systems is in INSTALL.txt (German: INSTALLATION.txt) in the main folder of the package.


FIRST CONSIDER: DO I NEED THE SUITE?
  If you only want to use the tools on your own and save your work as files, “Browser only” is simpler:
  no installation, no administrator password. To do so, choose “Browser only (easiest)” in the graphical
  installer (below, step 8) – or unpack the file “mc4y-werkzeuge.zip” and double-click “index.html” in it.
  This guide is for the whole suite (with sign-in, shared storage, calendar, wiki, tasks and daily backup)
  on your own computer.


WHAT YOU NEED
  - Windows 10 or 11. To check: press Windows key + R, type “winver” and press Enter.
    The window “About Windows” says “Windows 11” or “Windows 10”.
  - The password of an administrator account (an account that is allowed to install programs). If you set up
    the computer yourself, this is usually your own sign-in password.
  - Internet: The installer downloads PHP from windows.php.net (about 35 MB) and, if necessary, a runtime
    from Microsoft. PHP is the programming language the suite runs in.
  - About 15 minutes and 1 GB of free storage space.


STEP BY STEP

Part 1: Download and unpack the package
  1. Download “mc4y-suite.zip” (website of MY COACHING FOR YOU, area “Experimental”). Your browser puts the
     file in “Downloads”.
  2. Open Explorer (Windows key + E) and click “Downloads” on the left.
  3. Right-click “mc4y-suite” › “Properties”.
  4. If “Security” at the bottom says “This file came from another computer …”: tick “Unblock”.
     Then “OK”.
  5. Right-click “mc4y-suite” › “Extract All…” › “Extract”.
  6. In the new window, double-click the folder “MC4Y-Suite-…” (for example “MC4Y-Suite-0.4.15”).

Part 2: Start the installer
  7. Double-click “Installer-starten”.
     If a blue window “Windows protected your PC” appears: “More info” › “Run anyway”.
     You now see a black window “MC4Y-Suite - Installer” – leave it open! – and shortly afterwards, in your
     browser, the page “What would you like to set up?” (the installer has a DE | EN switch at the top
     right; this guide uses its English labels).
     If no browser opens: in the black window, mark the long address under “If no browser opens: select this
     address, copy it with the right mouse button and paste it into the browser:”, copy it and paste it into
     the address bar of your browser. (The black window speaks the language of Windows; on a computer set to
     German, the line reads “Oeffnet sich kein Browser: …”.)

Part 3: In the installer
  8. Click “The suite on this Windows computer”, then “Next →”.
  9. “New or update”: “Next →”.
 10. “Storage locations”: Next to “All locations on”, click a drive (if there is only one: “Drive C”).
     Green hints such as “OK – will be created” appear under the fields. If you have a second drive, it is
     best to put the “Daily backups” there (drive button under the field).
     Then “Next →”.
 11. “Tools”: leave everything selected, “Next →”.
 12. “Prerequisites”: wait a moment. Tick “I agree …”, then “Install”.
 13. Windows asks “Do you want to allow this app to make changes to your device?” – “Yes” (if asked, enter
     the name and password of an administrator).
 14. Wait (2 to 10 minutes) until “Installation complete.” appears.
 15. Click “Open suite”. On the page “Set up the suite”, create the first account: your name, user name
     (without spaces), password with at least 10 characters (twice), then “Set up and sign in”.
 16. Back in the installer, click “Close installer”.

From now on the suite starts by itself every time the computer starts up. Address (on this computer only):
http://127.0.0.1:8090/ – best save it as a bookmark (Ctrl + D). On the desktop and in the Start menu there is
also a shortcut “MC4Y Productivity Suite” (if the installation ran in German: “MC4Y-Produktivitaetssuite”).


HOW TO CHECK THAT IT WORKED
  1. Open http://127.0.0.1:8090/ in the browser: You see the suite’s sign-in page.
  2. Restart the computer and open the address again: The sign-in page is back.
  3. In the suite, “Administration” › “System check”: Most rows are green.
  4. “Administration” › “Backup” › “Back up now”, then “Check” in the new row.


COMMON PROBLEMS
  - The black window closes immediately: The package has not been unpacked. Do step 5 and start
    “Installer-starten” in the unpacked folder.
  - “Next →” stays grey: Under a field there is a red hint – read it and choose a different folder or
    a different drive.
  - “Port … is in use”: In the step “Storage locations”, enter for example 8091 under “Port”; the address is
    then http://127.0.0.1:8091/.
  - “PHP … does not start”: The Visual C++ runtime from Microsoft is missing. The installer offers it in the
    step “Prerequisites”; otherwise install “vc_redist.x64.exe” from Microsoft.
  - No administrator password: Ask the person who set up the computer – or use “Browser only”.


UPDATING
  Download the new “mc4y-suite.zip” and do parts 1 to 3 again. In the step “New or update” you then see
  “Existing installation found”, and “Update” is selected. Content, accounts and settings are kept; the
  database is backed up beforehand.


REMOVING
  1. In the unpacked package, open the folder “install” and in it “windows” (or in the program folder of the
     suite, for example C:\Program Files\MC4Y-Suite\install\windows).
  2. Double-click “deinstallieren” and answer the Windows prompt with “Yes”.
  3. At “Uninstall the suite? (y/n)” type y and press Enter.
  4. At “Press Enter to close” press Enter.
  (The window speaks the language of Windows; on a computer set to German it asks “Suite deinstallieren?
  (j/n)” – j and y both mean “yes”.)
  Your content stays in the data folder (for example C:\ProgramData\MC4Y-Suite-Daten). If it should go too,
  delete that folder yourself afterwards – or start “deinstallieren” with -DatenLoeschen (see below).


FOR EXPERTS

Language: All scripts write in English or German – by default in the display language of Windows. -Sprache en
or -Sprache de (otherwise the environment variable MC4Y_SPRACHE) chooses it; a script that restarts itself with
administrator rights passes the language on, and the graphical installer passes on the language of its own
user interface. The installation log, KURZANLEITUNG.txt (quick guide, server) and the shortcut (“MC4Y Productivity
Suite.url” or “MC4Y-Produktivitaetssuite.url”) follow the chosen language. The option names are German
(-Probelauf = dry run, -Aktualisieren = update, -DatenLoeschen = also delete the data folder). Confirmation words:
LOESCHEN (German for DELETE) stays the same in both languages; datenordner-verschieben.ps1 and wiederherstellen.ps1
ask “Type YES …” and accept YES and JA.

The scripts (ASCII only, Windows PowerShell 5.1; each with -Probelauf, a dry run that changes nothing)
  installieren.bat / installieren.ps1          single workstation, Windows 10/11 (without the graphical installer)
  installieren-server.bat / .ps1               Windows Server with IIS, on the server itself
  auf-server-installieren.ps1                  Windows Server by remote maintenance (WinRM, Kerberos) from a workstation
  installer-dienst.ps1                         helper of the graphical installer (127.0.0.1, random key)
  datenordner-verschieben.ps1                  move data storage and/or backups to new locations
  wiederherstellen.ps1                         restore a backup
  deinstallieren.bat / -server.bat             remove (data folder stays, except -DatenLoeschen + LOESCHEN)
  zuruecksetzen.bat                            empty the single-workstation data folder (type LOESCHEN)
  suite-betrieb.ps1                            shared building blocks

Single workstation without the graphical installer (Command Prompt in the package; Windows asks for administrator
rights):
  install\windows\installieren.bat -Probelauf
  install\windows\installieren.bat -PhpZip <php-8.x.y-nts-Win32-vs17-x64.zip> -PhpSha256 <checksum>
  without questions: -Programm E:\MC4Y-Suite -Daten E:\MC4Y-Suite-Daten -SicherungOrdner F:\MC4Y-Suite-Sicherungen
  in English: add -Sprache en
  Without -Daten, the script asks “Program folder […]”, “Data folder […]” and “Folder for the daily backups
  [empty = inside the data folder; another drive is better]” – Enter accepts the suggestion in brackets.
  PHP: https://windows.php.net/download/ (“VS17 x64 Non Thread Safe”, checksum next to it). The script creates the
  account mc4y-systemuser (without sign-in right), the task “MC4Y-Suite” (php -S 127.0.0.1:8090 at system start)
  and “MC4Y-Suite-Sicherung” (daily), and writes installation.json and the log installation_<time>.log in the
  program folder. At the end it says “Done. The suite is running at http://127.0.0.1:8090/” (dry run: “Dry run
  finished - nothing was changed.”).
  Update: installieren.bat -Aktualisieren [-DatenNeu …] [-SicherungenNeu …] -OhneBrowser -OhneWarten
  (backs up the database to <data folder>\_update-sicherung first).

Windows Server with IIS (details: public/handbuch-en.html, section 4; German: public/handbuch.html):
  install\windows\installieren-server.bat -PhpZip … -PhpSha256 … -VcRedist C:\Pakete\vc_redist.x64.exe
  powershell -ExecutionPolicy Bypass -File install\windows\auf-server-installieren.ps1 -Server server.firma.local -PhpZip … -PhpSha256 … -VcRedist …
  Sets up the IIS role services, PHP with its own php.ini, the application pool “MC4Y-Suite” (virtual identity,
  no user account), HTTPS with a self-signed certificate (or -Zertifikat <thumbprint> of your own certificate),
  the firewall rule, Windows authentication and the daily backup. It asks “Set up storage: where should the
  contents of the suite be kept …” and writes KURZANLEITUNG.txt (the quick guide) in the program folder. At the end
  it shows “Done. The suite is running at https://…” and “Setup code for the first account: …” (from a
  workstation, auf-server-installieren.ps1 also shows “Done: https://…” before the setup code).
  Update: -Aktualisieren; move: -Umziehen -Programm … .

Without internet
  Put the PHP package (with a file of the same name and the ending .sha256) and vc_redist.x64.exe into a folder
  “voraussetzungen” (German for prerequisites – type the name exactly like that) next to installer.html.

Do not start from a Nextcloud or other cloud folder: Hidden files such as .htaccess get lost that way. Always
download afresh and unpack.
