OK guess I am not totally done as yet. Like I said above I got the ServiceMODE function to change the service from "Disabled" to "Automatic". I even when through the help that R2D2 provided and created the below script and that changes the type from "Disabled" to "Automativ (see code). I have tried this on a couple different non-essential services and I get the same problem (see below).
Code:
Code:
$Key = "HKLM\SYSTEM\CurrentControlSet\Services\"
$ServiceState = ReadValue ($key + "Themes", "Start")
?" Altiris Agent Service State: " + $ServiceState
If $ServiceState <> "2"
WriteValue ($key + "Themes", "Start", "2", "REG_DWORD")
EndIF



The problem is that even though it changes the service from one start type to another I cannot start the service. I get an error saying the service is still disabled. Both the SERVICEMODE function and the above script does this.

If I use the GUI to change the service type, I do not have the problem. If I change the start type in the REGISTRY directly (using regedit) I do not have the problem. It is only when I use any script to change the value in the registry that I have this issue. To fix the service I simple open the service GUI and set it to disabled and then re-set it to automatic. That fixes it.

I have watched the registry as the script runs and can see it change the "Start" field from 4 to 2. I can see no difference between what the script does and what I do when I manually change the registry value (which works).

Anyone ever have this issue, can anyone offer any advice?