0

I'm working on the well known problem of MDT not wanting to automatically continue because of a legal disclaimer prompt at login. Our disclaimer is set at the domain policy, so I've created a new OU for staging, then blocked inheritance so it doesn't get the GPO. I have MDT set to place the newly built machine in that OU. All of that is fine, the problem is, the machine that I used as my capture machine had the disclaimer locally cached from already being on the network and even being in the proper OU the disclaimer is still there. So I've added a couple lines in MDT to go in and do the following:

REG DELETE hklm\software\microsoft\windows\currentversion\policies\system /v legalnoticetext /f
REG DELETE hklm\software\microsoft\windows\currentversion\policies\system /v legalnoticecaption /f

I've testd them manually and they work just fine to remove the entries and allow the machine to boot up without a prompt. The thing is, I can't find the exact place to place them in the task sequence. I want them to run before the first login, so I placed them In Postinstall, before the Restart Computer task. That didn't work, gave an error. I tried right before that, before Next Phase, same issue. I try putting them after Restart Computer, but before State Restore and they don't error out, but they don't seem to run until I hit "OK" through the one prompt, then it runs and never prompts again. So it's progress as before it would prompt me to hit "OK" through the disclaimer after every reboot, now I only have to hit it that one time and it removes the line from the cached registry and never prompts again. I just can't figure out how to get it to run before it gets to that first prompt so that it doesn't prompt at all. It's so close to being fully automated... My only other thought is to re-do my capture and run that line first, but I would love to avoid that unless it's my only option left. Thanks for any help or advice you can give.

2 Answers 2

2

The steps in the task sequence execute after the local administrator account has logged on and this needs to occur before. I'm not aware of a way around that within the task sequence itself.

You should be able to mount your WIM file and remove those lines using regedit against the registry contained within.

EDIT - I used to mount with dism and use the following command.

reg load HKLM\mounted <mount point>\windows\system32\config\system
8
  • A great suggestion! I attempted it but am running into an "Access Denied" error. I create a folder on the C drive called Mount. I then open CMD as Administrator, type in "dism /mount-wim /wimfile:"C:\DeploymentShare\Operating Systems\win7sp1\win7sp1.wim" /index:1 /mountdir:c:\mount and wait for the image to load. It successfully loads and I issue the command: reg load hklm\software\microsoft\windows\currentversion\policies\system c:\mount\windows\system32\config\software. It tells me Access Denied. I've read that can happen if the local registry doesn't have the same path defined, but
    – Don
    Feb 3, 2012 at 20:38
  • I verified and the server I'm on has that same key (not that I think it should matter because it's opening the wim, not local stuff, right?). Any suggestions? Thanks!
    – Don
    Feb 3, 2012 at 20:38
  • I'm not sure where the failure is occuring. I know for a fact I have mounted registries like this in the past. Maybe it is a x64 vs x32 thing. Feb 3, 2012 at 20:51
  • Well, I've tried this several times, from 3 different drives (in case of security) and have yet to get it to work properly. It mounts just fine, but won't allow me into the registry. I've tried adjusting NTFS settings on the file as well as making sure UAC is all the way down, logging on as administrator of the PC, etc. No go... Anybody have any other suggestions? So close, I'd really like to get this done instead of having to re-capture the whole thing. Thanks!
    – Don
    Feb 7, 2012 at 19:18
  • It looks like you are trying to load the registry very deep in the current registry file with this command:reg load hklm\software\microsoft\windows\currentversion\policies\system c:\mount\windows\system32\config\software Try this instead "reg load hklm\test c:\mount\windows\system32\config\software" If that completes, open regedit and navigate to hklm\test to see the loaded registry and make your changes.
    – dwolters
    Feb 7, 2012 at 22:27
2

It looks like you are trying to load the registry very deep in the current registry file with this command:reg load hklm\software\microsoft\windows\currentversion\policies\system c:\mount\windows\system32\config\software Try this instead "reg load hklm\test c:\mount\windows\system32\config\software" If that completes, open regedit and navigate to hklm\test to see the loaded registry and make your changes.

This is a TechNet blog article covering this exact subject.

I'm glad to hear that it worked. Happy Deploying!

(Tim deserves most of the credit, as his answer was correct... I merely corrected the syntax)

Edit: Added a reference for future readers

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .