Closed
Description
Description
When double clicking on a batch file or an executable, it's executed as SYSTEM user.
USERNAME=SYSTEM
USERPROFILE=C:\Users\OW
When you open a shell on a directory is is executed as the session user.
USERNAME=OW
USERPROFILE=C:\Users\OW
USERPROFILE is good but not USERNAME !
Steps To Reproduce
- log in Windows session as standard user (eg not SYSTEM user) and open Files.
1 Edit a batch files with the 2 lines :
SET
PAUSE
Open(double click) the batch file.
Look at USERNAME variable, it's SYSTEM
or
2 Open(double click) %windir%\system32\cmd.exe and run set command in the newly opened shell.
Look at USERNAME variable, it's SYSTEM
- Open a shell and run the batch file or set command
Look at USERNAME it it's the logged user name.
Requirements
When opening a batch file or an executable it should run in the user environmement eg environment, variable USERNAME should be equal to the logged user name, not SYSTEM.
Files Version
2.4.62.0
Windows Version
Window 11 pro 22H2 22261.1555
Log file
Metadata
Metadata
Assignees
Type
Projects
Status
✅ Done