Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - PATH variable is overwritten #1076

Open
gitchuon opened this issue Apr 12, 2024 · 16 comments
Open

[BUG] - PATH variable is overwritten #1076

gitchuon opened this issue Apr 12, 2024 · 16 comments
Labels
bug Something isn't working, let’s fix that can't reproduce

Comments

@gitchuon
Copy link

gitchuon commented Apr 12, 2024

Description

  • This is what i said in previous bug report:
    After install the new version of AtlasOS, i cant run .cmd files: the cmd window shows up and then close immediently. I tried to open CMD but some common commands does not work (image below)
  • I reported this bug in [BUG] - CMD stuffs get destroyed. #1072 but it's closed because my Windows edition is IoT Enterprise which is not recommended.
    image
  • Then I tried to reinstall AtlasOS on my clean Windows 11 Pro but i still get that bug, pls take a closer look.
    image

Steps to reproduce

  1. Double click to open a .cmd file or run some commands in cmd.

  2. Watch it doesnt work like you expected.

Expected behavior

It supposes to run normally.

Actual behavior

image
image

Atlas Edition

Atlas for Windows 11 23H2

Desktop information

Operating System: Windows 11 Pro
System Manufacturer: Acer
System Model: Aspire A715-43G
Processor: AMD Ryzen 5 5625U with Radeon Graphics (12 CPUs), ~2.3GHz
Memory: 24576MB RAM
Card name: NVIDIA GeForce RTX 3050 Laptop GPU

Additional content

[Update] Simply fixed it by looking up missing paths in this link and adding them back, those commands now work normally again.

@gitchuon gitchuon added the bug Something isn't working, let’s fix that label Apr 12, 2024
@Ast3risk-ops
Copy link

Ast3risk-ops commented Apr 12, 2024

btw cmd commands don't use -, they use / (so help is usually /?)

However dism should work as normal, so check your PATH (if cmd is crashing, it's probably because of these command not found errors, you may also want to try changing your default terminal emaulator to Windows Terminal as is the win11 default)

@gitchuon
Copy link
Author

gitchuon commented Apr 12, 2024

btw cmd commands don't use -, they use / (so help is usually /?)

yeah i was wrong at that point, but what ever it is, the 'sfc' still can not be recognized. i tried everthing i could but nothing get better, maybe i need to reinstall my windows again and wait for new atlas version...

@Ast3risk-ops
Copy link

btw cmd commands don't use -, they use / (so help is usually /?)

yeah i was wrong at that point, but what ever it is, the 'sfc' still can not be recognized. i tried everthing i could but nothing get better, maybe i need to reinstall my windows again and wait for new atlas version...

You may not have reinstalled correctly, what were your steps?

@gitchuon
Copy link
Author

gitchuon commented Apr 12, 2024

what were your steps?

just like everyone else: install ventoy on an usb stick, boot up an official iso and start to install windows normally. i had run those commands normally before installed Atlas so i pretty sure that Atlas causes this bug.

@Ast3risk-ops
Copy link

Ast3risk-ops commented Apr 12, 2024

what were your steps?

just like everyone else: install ventoy on an usb stick, boot up an official iso and start to install windows normally. i had run those commands normally before installed Atlas so i pretty sure that Atlas causes this bug.

That's not the steps, and if you're gonna use a USB, wipe your disk to ensure the install is clean (you don't even need to use a USB)

https://docs.atlasos.net/getting-started/installation/

@gitchuon
Copy link
Author

gitchuon commented Apr 13, 2024

That's not the steps

That's the MAIN STEPS I did, I just want you to understand that I know how to install Windows correctly, and the bug only appears after installing AtlasOS.

@Ast3risk-ops
Copy link

That's not the steps

That's the MAIN STEPS I did, I just want you to understand that I know how to install Windows correctly, and the bug only appears after installed AtlasOS

During USB install if you just clicked your C: drive you didn't fully wipe windows, so reinstall again, and wipe your drive (erase all partitions)

@gitchuon
Copy link
Author

During USB install if you just clicked your C: drive you didn't fully wipe windows

Nahh I didnt do that bro, i deleted every windows partitions and used diskpart to wipe my drive so pls understand that i know how to install windows correctly. The bug only appears after installing AtlasOS (2 times in 2 different windows edition!!).

@trolljoe
Copy link

are you sure you didn't delete anything from PATH? i have tried 0.4 and sfc, dism all work fine

@gitchuon
Copy link
Author

gitchuon commented Apr 13, 2024

are you sure you didn't delete anything from PATH?

yes, i ran some .cmd files and those command before installing AtlasOS so
im pretty sure that everything was run normaly

i have tried 0.4 and sfc, dism all work fine

that's so weird, i tried 0.4 on 2 different editons of windows (both are clean installation) and still got that bug...

@he3als
Copy link
Member

he3als commented Apr 13, 2024

Can you please send the TIOutput.txt in the Atlas folder inside of %ProgramData%\AME\Logs? The PATH variable is somehow messed up.

@gitchuon
Copy link
Author

gitchuon commented Apr 13, 2024

Unfortunately, I have just reinstalled Windows and no longer have that file 😔. I will try installing AtlasOS in a VM to see if the bug appears again; then I will send you the file. If it doesn't, I will close this report. Thanks for your reply.

(Btw, I really love your EdgeRemover script, it helps me a lot 🙌).

@gitchuon
Copy link
Author

Can you please send the TIOutput.txt in the Atlas folder inside of %ProgramData%\AME\Logs?

Here is the file you need
TIOutput.txt

@Ast3risk-ops
Copy link

TIOutput.txt

Pasted: https://paste.asterisk.lol/raw/ikecawunol

@gitchuon
Copy link
Author

gitchuon commented May 6, 2024

@Ast3risk-ops @he3als

  • I think I found out what causes this error. Maybe while AtlasOS is modifying system variables, instead of adding some new paths, it replaces them (or deletes them, even Chocolatey got affected). So that's why in 'Environment Variables'/System variables/path, I only see nothing but AtlasOS's paths.
  • I simply fixed it by looking up missing paths in this link and adding them back, those commands now work normally again.
    IMG_20240506_220359~2.jpg

IMG20240506220546.jpg

@he3als
Copy link
Member

he3als commented May 7, 2024

Atlas doesn't replace the PATH variable, it just appends to it. https://github.com/Atlas-OS/Atlas/blob/main/src/playbook/Configuration/atlas/start.yml#L9

I'm not too sure what could be wrong or how to reproduce your issue.

@he3als he3als changed the title [BUG] - CMD stuffs got destroyed (AGAIN)😀 [BUG] - PATH variable is overwritten May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working, let’s fix that can't reproduce
Projects
None yet
Development

No branches or pull requests

4 participants