Courseiva
Manage applications →hardMultiple Choice

MD-102 Manage applications Practice Question

You manage Windows 10 devices with Microsoft Intune. You deploy a Win32 app that must run a custom installation script. The script requires a specific environment variable to be set during installation. The app installer does not set this variable. You need to ensure the variable is set only for the installation process and not permanently on the device. What should you do?

⚠ Common exam trap

The trap here is assuming that any method of setting an environment variable will work, but permanent or user-specific settings violate the requirement for a temporary, process-scoped variable.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Include the environment variable in the install command using the 'cmd /c set VAR=value && installer.exe' syntax.

Using the 'set' command within the install command line sets the environment variable only for that command's process. The variable is not written to the registry or user profile, so it does not persist after the installation completes. This satisfies the requirement of a temporary variable.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Create a PowerShell script that sets the environment variable at the machine level, then run the installer.

    Why it's wrong here

    Setting the environment variable at the machine level using [Environment]::SetEnvironmentVariable with 'Machine' scope makes it permanent. The requirement is to set it only for the installation process, so this would leave the variable on the device, which is not desired.

  • ✗

    Use a requirement rule to set the environment variable before installation.

    Why it's wrong here

    Requirement rules are used to evaluate conditions, not to set environment variables. They cannot modify the system; they only check for existence of files, registry keys, or values. This would not set the variable for the installation.

  • ✗

    Configure the app to run in user context and set the variable in the user's profile.

    Why it's wrong here

    Setting the variable in the user's profile would persist beyond the installation and would only affect that user. The requirement is to set it only for the installation process, not permanently or for a specific user. User context also may not have sufficient privileges for installation.

  • ✓

    Include the environment variable in the install command using the 'cmd /c set VAR=value && installer.exe' syntax.

    Why this is correct

    You can set an environment variable for the duration of the command by using the 'set' command in a command prompt. This sets the variable only for that process and its child processes, so it does not persist on the device after installation. This meets the requirement.

About these practice questions

This MD-102 question is part of Courseiva's 556-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Microsoft exam blueprint

This MD-102 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the MD-102 exam.