Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
winetricks
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
winetricks
Commits
b7ae3b80
Commit
b7ae3b80
authored
Oct 14, 2024
by
Ivan Ivlev
Committed by
Vitaly Lipatov
Oct 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winetricks: add work workaround for guest user (eterbug #17026) (eterbug #17737)
Signed-off-by:
Ivan Ivlev
<
iviv@etersoft.ru
>
parent
35956171
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
115 additions
and
0 deletions
+115
-0
0005-workaround-for-guest-user.patch
patches/0005-workaround-for-guest-user.patch
+115
-0
No files found.
patches/0005-workaround-for-guest-user.patch
0 → 100644
View file @
b7ae3b80
From fba388e7e6a18f1eb575e5e98f6998f1f02b1413 Mon Sep 17 00:00:00 2001
From: Nurlan Usenov <suren@etersoft.ru>
Date: Tue, 27 Feb 2024 17:18:23 +0300
Subject: [PATCH] dotnet35sp1: Workaround for error if the username is "guest"
---
src/winetricks | 42 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/src/winetricks b/src/winetricks
index 4544e3d..374c2bd 100755
--- a/src/winetricks
+++ b/src/winetricks
@@ -1346,6 +1346,36 @@ w_dotnet_verify()
w_info ".Net Verifier returned ${dn_status}"
}
+# Workaround for "You do not have sufficient rights to run this application" error if the username is "guest".
+w_replace_username_guest()
+{
+ if [ -n "${WINEUSERNAME}" ]; then
+ WINEUSERNAME_COPY="${WINEUSERNAME}"
+ else
+ WINEUSERNAME="${USERNAME}"
+ fi
+
+ if echo "${WINEUSERNAME}" | grep -q -i "^guest$"; then
+ TMP_USERNAME="$(basename "$(mktemp -u)")"
+ w_try ln -s "${W_DRIVE_C}/users/${WINEUSERNAME}" "${W_DRIVE_C}/users/${TMP_USERNAME}"
+ export WINEUSERNAME="${TMP_USERNAME}"
+ fi
+}
+
+# Restore username if it has been changed in w_replace_username_guest
+w_restore_username()
+{
+ if [ -n "${TMP_USERNAME}" ]; then
+ w_try rm "${W_DRIVE_C}/users/${TMP_USERNAME}"
+ fi
+
+ if [ -z "${WINEUSERNAME_COPY}" ]; then
+ unset WINEUSERNAME
+ else
+ WINEUSERNAME="${WINEUSERNAME_COPY}"
+ fi
+}
+
# Checks if the user can run the self-update/rollback commands
winetricks_check_update_availability()
{
@@ -9297,8 +9327,10 @@ load_dotnet20sp1()
w_set_winver winxp
fi
+ w_replace_username_guest
w_try_cd "${W_CACHE}/${W_PACKAGE}"
w_try_ms_installer "${WINE}" "${exe}" ${W_OPT_UNATTENDED:+/q}
+ w_restore_username
if [ "${W_ARCH}" = "win32" ]; then
# We can't stop installing dotnet20sp1 in win2k mode until Wine supports
@@ -9358,8 +9390,10 @@ load_dotnet20sp2()
exe="NetFx20SP2_x64.exe"
fi
+ w_replace_username_guest
w_try_cd "${W_CACHE}/${W_PACKAGE}"
w_try_ms_installer "${WINE}" "${exe}" ${W_OPT_UNATTENDED:+ /q /c:"install.exe /q"}
+ w_restore_username
if [ "${W_ARCH}" = "win32" ]; then
# We can't stop installing dotnet20sp1 in win2k mode until Wine supports
@@ -9443,9 +9477,11 @@ load_dotnet30()
WINEDLLOVERRIDES="ngen.exe,mscorsvw.exe=b;${WINEDLLOVERRIDES}"
export WINEDLLOVERRIDES
+ w_replace_username_guest
w_try_cd "${W_CACHE}/${W_PACKAGE}"
w_warn "Installing .NET 3.0 runtime silently, as otherwise it gets hidden behind taskbar. Installation usually takes about 3 minutes."
w_try "${WINE}" "${file1}" /q /c:"install.exe /q"
+ w_restore_username
w_override_dlls native mscorwks
w_restore_winver
@@ -9497,7 +9533,9 @@ load_dotnet30sp1()
"${WINE}" sc delete FontCache3.0.0.0
+ w_replace_username_guest
w_try_ms_installer "${WINE}" "${file1}" ${W_OPT_UNATTENDED:+/q}
+ w_restore_username
w_override_dlls native mscorwks
w_restore_winver
@@ -9543,8 +9581,10 @@ load_dotnet35()
w_override_dlls native mscoree mscorwks
w_wineserver -w
+ w_replace_username_guest
w_try_cd "${W_CACHE}/${W_PACKAGE}"
w_try_ms_installer "${WINE}" "${file1}" /lang:ENU ${W_OPT_UNATTENDED:+/q}
+ w_restore_username
w_restore_winver
@@ -9597,8 +9637,10 @@ load_dotnet35sp1()
w_try_cd "${W_TMP}"
w_try ln -s "${W_CACHE}/${W_PACKAGE}/${file1}" .
+ w_replace_username_guest
WINEDLLOVERRIDES="ngen.exe=n" w_try_ms_installer "${WINE}" dotnetfx35.exe /lang:ENU ${W_OPT_UNATTENDED:+/q}
w_try rm dotnetfx35.exe
+ w_restore_username
w_restore_winver
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment