**The Problem:**

If you have set up a PC with a restricted Standard User account (for a child or security reasons), Genshin Impact is a nightmare to launch.

1. The Anti-Cheat requires Admin rights, triggering the UAC password prompt every time game launches.
2. The HoYoPlay launcher needs to update major patch every 6 weeks and the launcher itself requires Admin rights.

**The Solution:**

I discovered a stable method using a simple `.bat` script and the `runas /savecred` commands in a string. This allows the launcher to run with full Admin rights (needed for updates and Anti-Cheat) while the user stays restricted. It asks for the password once and never again.

Here is the step-by-step guide.

# Prerequisite: Folder Permissions (CRITICAL)

Before you start, you must allow the Standard User to write to the game folder. If you skip this, updates will fail.

1. Log in as your **Admin** account.
2. Right-click the folder where Genshin is installed (e.g., `C:\Games\HoYoPlay`).
3. Go to **Properties -> Security -> Edit**.
4. Click Add, type the Child's/Standard User's name, and click OK.
5. With that user selected, check the box for **Full Control**.
6. Click OK.

# Phase 1: Create the Batch File (The Fix)

We need a script to force the launcher to open in the correct folder. If you just try to run the EXE directly as Admin, it often crashes because it doesn't know "where" it is.

1. Open Notepad.
2. Paste the following code. **IMPORTANT**: You must replace the path in the second line with your actual game path ("`C:\path`")

​

@echo off
:: Force the script to move to the correct drive and folder
:: REPLACE THE PATH BELOW WITH YOUR ACTUAL HOYOPLAY FOLDER
cd /d "C:\Games\HoYoPlay"

:: Launch the program
start "" "launcher.exe"

exit

Save the file as `hoyoplayfix.bat`. (When saving, make sure you select "All Files" in Notepad so it doesn't save as hoyoplayfix.bat.txt).

💡 Pro Tip: Use AI to fix the path

If you don't know how to format the file path correctly, just copy the code block above into ChatGPT/Gemini and say:

>Here is the path to my HoYoPlay folder: \[Insert your path\]. Please fix the batch script code for me.

# Phase 2: Place the File Correctly

Do **not** leave this file on the Standard User's desktop. When the script runs as Admin, the Admin account might not have permission to read files from the Standard User's desktop.

* Move `hoyoplayfix.bat` into the game folder (e.g., `C:\Games\HoYoPlay\`).
* This ensures both the Admin and the User can access it.

# Phase 3: Create the Shortcut

Now we create the button the user will click. This uses a command to save the Admin credentials.

1. Log in to the Standard User's account. (or goto `C:\Users\username\Desktop`)
2. Right-click the Desktop -> **New -> Shortcut.**
3. In the location box, you need to paste a specific command.

**The Formula:**

`runas /user:YOUR_ADMIN_USERNAME /savecred "cmd /c "PATH_TO_YOUR_BAT_FILE""`

**Example (Don't copy this, make your own):**

`runas /user:DadPC /savecred "cmd /c "C:\Games\HoYoPlay\hoyoplayfix.bat""`

💡 Pro Tip: Use AI to generate the command to avoid syntax errors with quotes, ask AI:

>I need a Windows runas command. My Admin username is \[Insert Name\] and the path to my bat file is \[Insert Path\]. Please write the full command for me.

Name the shortcut **Genshin Impact** or just **HoYoPlay** and click Finish.

# Phase 4: Make the icon pretty

1. Right click the shortcut -> **Properties**
2. Click **Change icon..**
3. Click **Browse...** and go to `C:\Games\HoYoPlay` folder
4. Click launcher.exe and **open**
5. Select the icon -> OK -> OK -> Done.

# Final Step: The First Run

1. Double-click the new shortcut (Log in to standard user account).
2. A black window will pop up asking for the Admin Password.
3. Type it in (you won't see the cursor move) and press Enter.
1. if you mess the PW, right click shortcut and **Run as administrator ->** this will re prompt the cmd window.
4. The Launcher should open.

**Done!** Windows has now saved that password in its secure Vault for this specific command. The user can now click that icon to play or update the game, and it will launch as Admin automatically without ever asking for the password again.

And as a bonus. Now normal user can install all the HoYoPlay games and update them aswell.
And as an extra extra bonus: doing `runas` shortcut for Steam and fixing folder permissions allows game installs through it permanently.

Voir le contenu lié