Windows ISO unattended

engin çiçek 5 Saygınlık puanı
2026-09-05T04:43:04.4033333+00:00

Why isn't the %windir% command working? I have unattended programs installed.

The %wind% command is giving an error on ISO 11.

Windows Ev | Windows 11 | Ayarlar
0 yorum Açıklama yok

1 yanıt

Sıralama ölçütü: En yararlı
  1. Vikki-T 11,350 Saygınlık puanı Microsoft Harici Personeli Moderatör
    2026-09-05T09:10:59.72+00:00

    Please note that this is Turkish Q&A Forum, any threads should be posted in Turkish. However, I will still provide an answer on English based on your initial response.


    Hi engin çiçek,

    I understand that %windir% is producing an error while you are using an unattended Windows 11 installation.

    Please note that %windir% is an environment variable, not a command by itself. It normally expands to the Windows directory, such as C:\Windows. If %windir% is entered alone in Command Prompt, Windows may try to execute the expanded folder path and return an error.

    The result can also depend on when the command runs. During the Windows PE or early Setup phase, %windir% may refer to the Windows PE environment rather than the Windows 11 installation on the target drive. This could cause an application installer or script to use the wrong path.

    Could you please provide the following details?

    • The exact command or relevant section of your Autounattend.xml or Unattend.xml file
    • The complete error message or error code
    • The configuration pass where the command runs, such as windowsPE, specialize, or oobeSystem
    • Whether the command works after Windows 11 finishes installing
    • Whether the ISO is an official Microsoft ISO or a customized image

    Please remove any product keys, passwords, usernames, or other personal information before sharing the file or screenshot.

    You may also test the command with cmd.exe /c and use echo %windir% to confirm which Windows directory the variable resolves to at that stage. If the command is intended to install applications into the completed Windows installation, it may need to run during a later configuration pass rather than during Windows PE.

    For reference, Microsoft explains the Windows Setup configuration passes and unattended answer files here: Answer files (unattend.xml) Thank you so much for your understanding.   


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Bu yanıt yardımcı oldu mu?


Yanıtınız

Yanıtlar, soru sahibi tarafından ‘Kabul Edildi’ ve moderatörler tarafından ‘Önerildi’ olarak işaretlenebilir, bu da kullanıcıların yanıtın yazarın sorununu çözdüğünü bilmelerine yardımcı olur.