Friday, May 24, 2019

Make discord launcher without installing it on diskless client

This tutorial goal is to make discord works in diskless environment without have to install it on client :

1. Install discord first normally on server, then you copy discord folder located on "%USERPROFILE%\AppData\Local" directory. Then paste it on other drive.
2. Cut folder "%USERPROFILE%\AppData\Roaming\Discord", then place it inside discord folder that we moved in the step 1 (one).
3. Then make a batch file inside the discord folder and rename it as you desired.
4. Copy paste these commands into the batch file :

@echo off
set batdir=%~dp0
mklink /J "%USERPROFILE%\AppData\Local\Discord" "%batdir%"

mklink /J "%USERPROFILE%\AppData\Roaming\Discord" "Discord"
start "" "%USERPROFILE%\AppData\Local\Discord\update.exe" --processStart discord.exe
exit


Note : 
- %~dp0 is used to get the folder path where the file/script is located (e.g. D:\Discord\ ).
- %~f0 is used to get the full path of the script/file (e.g. D:\Discord\discordlauncher.bat ).
- %USERPROFILE% is used to get the current account path (e.g. C:\Users\Admin ).
- For other information about environment variable type set in command line.

2 comments: