winpe support + windows webdav stuff

This commit is contained in:
ed 2022-10-19 00:06:48 +02:00
parent f0e98d6e0d
commit 046b494b53
4 changed files with 14 additions and 5 deletions

View file

@ -716,14 +716,18 @@ enable with `--dav`, supports winxp, win7
on windows xp/7, connect using the explorer UI: on windows xp/7, connect using the explorer UI:
* rightclick [my computer] -> [map network drive] -> [Connect to a network server] hyperlink -> [Choose a custom network location] -> `http://192.168.123.1:3923/` * rightclick [my computer] -> [map network drive] -> [Connect to a network server] hyperlink -> [Choose a custom network location] -> `http://192.168.123.1:3923/`
on windows 7/8/10, connect using command prompt (`wark`=password):
* `net use w: http://192.168.123.1:3923/ wark /user:a`
on windows 7/8/10, disable wpad for performance: on windows 7/8/10, disable wpad for performance:
* control panel -> [network and internet] -> [internet options] -> [connections] tab -> [lan settings] -> automatically detect settings: Nope * control panel -> [network and internet] -> [internet options] -> [connections] tab -> [lan settings] -> automatically detect settings: Nope
known issues: known issues:
* win7 has a bug where it doesn't actually send the password to the server, so please type your password into the username field
* win7 cannot access servers which require authentication unless you use https or [enable basic authentication](./contrib/webdav-basicauth.reg) for http
* win7 cannot download files larger than 47.6 MiB by default; [registry fix](./contrib/webdav-unlimit.bat) to allow files up to 4 GiB (actual absolute max on windows)
* winxp cannot show unicode characters outside of *some range* * winxp cannot show unicode characters outside of *some range*
* latin-1 is fine, hiragana is not (not even as shift-jis on japanese xp) * latin-1 is fine, hiragana is not (not even as shift-jis on japanese xp)
* win7 cannot access servers which require authentication unless you use https or [enable basic authentication](./contrib/webdav-basicauth.reg) for http
* win7 has a bug where it doesn't actually send the password to the server, so please type your password into the username field
## file indexing ## file indexing

View file

@ -1,7 +1,7 @@
@echo off @echo off
rem removes the 47.6 MiB filesize limit when downloading from webdav rem removes the 47.6 MiB filesize limit when downloading from webdav
at > nul net session >nul 2>&1
if %errorlevel% neq 0 ( if %errorlevel% neq 0 (
echo you must run this as admin echo you must run this as admin
pause pause

View file

@ -195,7 +195,8 @@ def init_E(E: EnvParams) -> None:
E.mod = _unpack() E.mod = _unpack()
if sys.platform == "win32": if sys.platform == "win32":
E.cfg = os.path.normpath(os.environ["APPDATA"] + "/copyparty") bdir = os.environ.get("APPDATA") or os.environ.get("TEMP")
E.cfg = os.path.normpath(bdir + "/copyparty")
elif sys.platform == "darwin": elif sys.platform == "darwin":
E.cfg = os.path.expanduser("~/Library/Preferences/copyparty") E.cfg = os.path.expanduser("~/Library/Preferences/copyparty")
else: else:

View file

@ -66,7 +66,11 @@ def meichk():
pids = [] pids = []
ptn = re.compile(r"^([^\s]+)\s+([0-9]+)") ptn = re.compile(r"^([^\s]+)\s+([0-9]+)")
procs = sp.check_output("tasklist").decode("utf-8", "replace") try:
procs = sp.check_output("tasklist").decode("utf-8", "replace")
except:
procs = "" # winpe
for ln in procs.splitlines(): for ln in procs.splitlines():
m = ptn.match(ln) m = ptn.match(ln)
if m and filt in m.group(1).lower(): if m and filt in m.group(1).lower():