We help IT Professionals succeed at work.

Adm To Set Registry Cannot set default value

Medium Priority
349 Views
Last Modified: 2012-05-06
Hi All,
First post to experts exchange so bear with me! I am Trying to create a registy file that stops sophos from checking for updates on startup and wait for the update schedule. You may ask why? the main reason is I work in education, chances are the pc has already been on 10 minutes ago from the previous class and has been shutdown and when the user then next turns it on it checks again extra network traffic and work for the pc's which are not top spec everywhere that is not needed. The default cycle is every 2 hours anyway.

I created the code below, and it works however when I import in to group policy I have to manually type into the policy when I enable it the following line:

C:\Program Files\Sophos\AutoUpdate\ALsvc.exe" "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe"  -NoStartupCheck"

What I am trying to achieve is to have the information already there as default so it is there when the administrator enables to the policy rather than have to type in the line.

First time I have experimented with creating my own .adm file so any help would be appreciated.

Lee


#if version >= 4
 
CLASS MACHINE
 
CATEGORY !!Sophos
 
KEYNAME "SYSTEM\CurrentControlSet\Services\Sophos AutoUpdate Service"
 
 POLICY "ImagePath"
  PART "ImagePath"
  EDITTEXT 
  VALUENAME "ImagePath" 
 
  DEFAULT " "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe" "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe"  -NoStartupCheck"
  END PART
 END POLICY
 
END CATEGORY
 
 
 
[strings]
 
Sophos="Sophos No Update"

Open in new window

Comment
Watch Question

Hayes JupeIT Director
CERTIFIED EXPERT

Commented:
Group policy can only be used to manipulate the registry.... looks like your trying to run a command there...
find the appropriate reg key for sophos to set what you want and use that...

Commented:
Hi There

I have amended your code for you. I tested this and it works in teh GPO editor as expected no. You ust need to test the rest of the process.

What version of Windows are you running the AD on?
I tested this on Server/AD 2003.
When you add the Template to the GPO editor you will need to right-click on your new Category and select View -> Filtering -> Deselect the "only show policy settings that can be fully managed"

Hope it works ok for you

Regards
Krystian
Be aware, you may need to 

Open in new window

Commented:
Sorry, dont know what happened there!
Here is the code again.

Krystian
#if version >= 4
 
CLASS MACHINE
CATEGORY !!Sophos
	POLICY "ImagePath"
		KEYNAME "SYSTEM\CurrentControlSet\Services\Sophos AutoUpdate Service"
			
		PART "ImagePath" EDITTEXT
			VALUENAME "ImagePath" 
			DEFAULT !!ImagePath_DefaultText
 
		END PART
	END POLICY
 
END CATEGORY
 
 
 
[strings]
Sophos="Sophos No Update"
ImagePath_DefaultText = "C:\Program Files\Sophos\AutoUpdate\ALsvc.exe C:\Program Files\Sophos\AutoUpdate\ALsvc.exe -NoStartupCheck"

Open in new window

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
This worked a treat many thanks Kris K.

Lee
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.