Sunday, November 15, 2015

Open file security warning prompt SCCM OSD

If you are receiving open file security warning when running a script or an application within SCCM OSD task sequence that can be disabled using turning off the open file security warning using registry keys.

The following registry keys will disable the Open file security warning;
One REG key is required to be added to Current user.
REG ADD "HKU\Default\Environment" /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 1 /F
Second REG key is required to add to Local Machine;
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 1 /F

Adding a registry key to local machine is easy and straight forward. However, adding to a current user registry key bit a tricky task for few.
I will show how to add the current user and as well as local machine keys without any issues;

1. Open the task sequence in edit mode
2. Create a run command line step then copy the below command;
REG LOAD HKU\Default C:\Users\Default\NTUSER.DAT
This will mount default user registry keys from NTUSER.DAT to HKEY Users\Default key


3. Create a 2nd command line step then copy the below command;
REG ADD "HKU\Default\Environment" /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 1 /F
This will add registry value to the default user profile


4. Create a 3rd command line step then copy the below command;
REG UNLOAD HKU\Default
This will unmount the NTUSER.DAT file which we have mounted in step 2


5. Create a 4th command line step then copy the below command;
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /V SEE_MASK_NOZONECHECKS /T REG_SZ /D 1 /F
This will add the SEE_MASK_NOZONECHECKS key and value to the local machine.
Now save the task sequence and test the deployment.

1 comment:

  1. Thanks for article.
    I had this issue and solved these steps.

    ReplyDelete