-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWindows_install_basics_4.bat
More file actions
175 lines (104 loc) · 6.1 KB
/
Copy pathWindows_install_basics_4.bat
File metadata and controls
175 lines (104 loc) · 6.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
#Meta info - private list of how to surive in MS Windows OS in a non-admin environment, messy as hell for now
#Ver 4.1.2
#Note to self: fuller info and tricks may be on the Droid, SD Card, Installs ... folder
#REM - see also here : https://docs.google.com/document/d/1FtANN49gR8vE4B7cskDL4Yajw6cRQ7Fw8VrJugRGlaQ/edit?pli=1&tab=t.0 , for now
#REM - see C:\Users\IFP\Documents\Portable_when_on_Public_comps\_Meta_scripts etc.
# command:
bash
shutdown /r/fw/f/to
Here's what the command means:
/r: Restarts the computer.
/fw: Instructs the system to restart into the firmware (BIOS/UEFI).
1. Open Settings:
Press Windows + I to open Settings.
2. Navigate to the Update & Security Section:
Go to Update & Security.
3. Access Recovery Options:
In the left sidebar, click on Recovery
Under Advanced startup, click on Restart now. This will reboot your PC with extra options.
4. Choose UEFI Firmware Settings:
After your PC restarts, you'll be presented with a blue screen with several options.
• Click on Troubleshoot > Advanced options > UEFI Firmware Settings.
Click Restart, and your PC will boot into the BIOS/UEFI settings.
This method should work on all modern versions of Windows 10 and will allow you
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy]
[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{48981759-12F2-42A6-A048-028B3973495F} Machine\System\CurrentControlSet\Policies]
"LongPathsEnabled"=dword:00000001
#Or, needs admin:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem]
"LongPathsEnabled"=dword:00000001
#Msys2 asap install:
REM choco install, in cmd:
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin;;C:\Users\%USERPROFILE%\Documents\Python_script"
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; $chocoPath = Join-Path $env:LOCALAPPDATA 'Chocolatey'; mkdir $chocoPath -ErrorAction SilentlyContinue; $installScriptUrl = 'https://chocolatey.org/install.ps1'; $installScriptPath = Join-Path $chocoPath 'install.ps1'; Invoke-WebRequest -Uri $installScriptUrl -OutFile $installScriptPath; & $installScriptPath; $binPath = Join-Path $chocoPath 'bin'; [Environment]::SetEnvironmentVariable('PATH', '$binPath;$env:PATH', 'User'); if (Get-Command choco -ErrorAction SilentlyContinue) { Write-Host 'Chocolatey installed successfully.' } else { Write-Host 'Chocolatey installation failed.' }"
echo Chocolatey exe files are at:
dir C:\choco.exe /s /b
echo Winget exe files are at:
dir C:\winget.exe /s /b
echo %PATH%
REM choco install winget --force
choco install wget ffmpeg nano exiftool llvm.portable mpv.portable note dotnetcore-runtime.portable
#choco install llvm.portable --force
REM winget install python
set CC=clang
set CCX=clang++
choco install numpy
REM For git:
winget install --id Git.Git -e --source winget
REM refreshenv
dir C:\bash.exe /s /b
REM or use that one:
REM cd C:\Users\%USERPROFILE%\Documents\Portable_when_on_Public_comps\git-bash.exe
Rem Or: choco install git
Rem Conda:
winget install --id=Anaconda.Miniconda3 -e --source winget
REM then run all in the Anaconda shell
winget install abd
REM or: choco install adb
REM Note about Python and long paths. Below may not work:
REM Define the path to the registry key
set registryPath=HKLM\SYSTEM\CurrentControlSet\Control\FileSystem
REM Define the name of the registry entry and its value
set Name=LongPathsEnabled
set value=1
REM Add the registry entry
reg add "%registryPath%" /v %Name% /t REG_DWORD /d %value% /f
pip install easyocr whisperx openai-whisper open-interpreter funasr torch
pip install tts
REM Gnirehtet for ANdroid:
REM git clone https://github.com/Genymobile/gnirehtet.git
REM cd gnirehtet\relay-rust
REM cargo build --release
REM And then copy the target/release to some in %PATH%
wget https://github.com/Genymobile/gnirehtet/releases/download/v2.5.1/gnirehtet-rust-win64-v2.5.1.zip
tar -xaf gnirehtet-rust-win64-v2.5.1.zip
copy gnirehtet-rust-win64\gnirehtet.exe %USERPROFILE%\Chocolatey\bin\
rem gnirehtet start
Rem setx PYTHONPATH "%PYTHONPATH%;C:\Users\%USERPROFILE%\Documents\Python_script"
wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.7.1/npp.8.7.1.portable.x64.zip
@echo off
mkdir "C:\ProgramData\chocoportable\bin"
wget https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.7.1/npp.8.7.1.portable.x64.zip
tar -xaf "npp.8.7.1.portable.x64.zip" -C "C:\ProgramData\chocoportable\bin"
start "" "C:\ProgramData\chocoportable\bin\notepad++.exe"
#PATHs:
@echo off
echo - Run this file manually whenever needed, and open new terminal too:
REM Update PATH to include necessary directories
setx PATH "%LOCALAPPDATA%\miniconda3\;%LOCALAPPDATA%\miniconda3\Library\bin\;%LOCALAPPDATA%\Microsoft\WindowsApps;C:\ProgramData\chocoportable\bin;%LOCALAPPDATA%\miniconda3\Scripts;%USERPROFILE%\AppData\Local\Programs\Git\bin;%LOCALAPPDATA%\Chocolatey; C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;%USERPROFILE%\Chocolatey\bin\;%LOCALAPPDATA%\Microsoft\WindowsApps\;%USERPROFILE%\Documents\anaconda3\scripts;%PROGRAMDATA%\chocolatey\bin\;C:\Users\IFP\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts\;C:\ProgramData\mingw64\mingw64\bin\:$USERPROFILE\Documents\Msys64\mingw64\bin"
REM plus: %PATH%
refreshenv
echo New path:
echo %PATH%
REM Or opening new terminal many times may be needed
#exit
refreshenv
echo %PATH%
conda install -c conda-forge exiftool
#Must be in conda to run:
conda activate
echo Now install the lot from Unix: https://github.com/Manamama/MS_Windows_scripts/blob/main/msys2_1.sh and try : https://github.com/Manamama/Ubuntu_Scripts_1/blob/main/docling_me.sh
echo
echo And pray that it works.