?
Solved

Adm To Set Registry Cannot set default value

Posted on 2009-02-10
4
Medium Priority
?
335 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

0
Comment
Question by:budbud
  • 2
4 Comments
 
LVL 15

Expert Comment

by:HayesJupe
ID: 23604944
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...
0
 
LVL 12

Expert Comment

by:Krys_K
ID: 23606751
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

0
 
LVL 12

Accepted Solution

by:
Krys_K earned 200 total points
ID: 23606755
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

0
 

Author Comment

by:budbud
ID: 23609527
This worked a treat many thanks Kris K.

Lee
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing many questions for JRNL_WRAP_ERROR for replication failure, I thought it would be useful to write this article.
High user turnover can cause old/redundant user data to consume valuable space. UserResourceCleanup was developed to address this by automatically deleting user folders when the user account is deleted.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question