Batch file that adds reg key fails in sccm

I am trying to make a couple sccm applications work.  The first app checks to see if Faronics DeepFreeze is thawed and if it is then inserts the autologin credentials and reboots.  The second batch file undoes the autologin and then issues the command to deepfreeze to reboot frozen.  If I run either or both of the batch files from a command prompt the run correctly and do what they are supposed to do.  If I run them for a user as available both applications will fail.  It dos not say why it fails.  If deployed to devices they do not show up in Software Center to be runable.  Both batch files are set as available.  Once working the device application will be set to "required".

My question is why would the batch file work when run from within a command prompt but fail when delivered by sccm?

Thank you.

June 30th, 2015 1:35pm

Try running your cmd the same way CM07 does.

http://verbalprocessor.com/2007/12/05/running-a-cmd-prompt-as-local-system/

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 2:39pm

see if this works for you?

https://brpoblog.wordpress.com/2012/12/18/deploy-registry-settings-to-64-bit-systems-via-sccm/

Free Windows Admin Tool Kit Click here and download it now
June 30th, 2015 11:17pm