Task to increase IE cache vis registry

(imported topic written by carroll91)

I am having some trouble setting up a registry task to increase our IE cache to 250 mb for all customers. My basic script is

action uses wow64 redirection false

delete __appendfile

delete wizardedit.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

appendfile “CacheLimit”=dword:003EBE8

appendfile

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Content

appendfile “CacheLimit”=dword:003EBE8

move __appendfile wizardedit.reg

waithidden regedit /s “wizardedit.reg”

It runs as successful but does not make the change on the desktop. Any help getting this to work for me is appreciated. Writing scripts is not yet my strong point as I am learning BigFix.

Cheers, Carroll.

(imported comment written by Jim23)

The agent runs as system and therefore does not see the HKEY_Current_user branch. You will have to run it as the currently logged on user.

Changing the HKCU registry

Here is how to change the registry for the logged on user:

appendfile REGEDIT4

appendfile

appendfile

HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main

appendfile “Start Page”=“http://www.google.com/

copy __appendfile temp.reg

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320 http://software.bigfix.com/download/bes … er-2.0.exe

utility __Download\RunAsCurrentUser.exe

waithidden __Download\RunAsCurrentUser.exe regedit /s temp.reg

Notes:

  • Only works if a user is logged on.
  • If multiple users are logged on, the user logged in at the computer’s console will have their registry updated.

For more info: http://forum.bigfix.com/viewtopic.php?id=1909

(imported comment written by carroll91)

Jim,

Thanks for your assistance. When I run the below action script the job ends as not relevant when run against my own PC trying to increase my IE7 cache size. I want to deploy the task to 1500 customers.

Action Script

action uses wow64 redirection false

delete __appendfile

delete wizardedit.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

appendfile “CacheLimit”=dword:0003EBE8

copy __appendfile temp.reg

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320

http://software.bigfix.com/download/bes … er-2.0.exe

utility __Download\RunAsCurrentUser.exe

waithidden __Download\RunAsCurrentUser.exe regedit /s temp.reg

//move __appendfile wizardedit.reg

//waithidden regedit /s “wizardedit.reg”

Relevance

action uses wow64 redirection false

delete __appendfile

delete wizardedit.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

appendfile “CacheLimit”=dword:0003EBE8

copy __appendfile temp.reg

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320

http://software.bigfix.com/download/bes … er-2.0.exe

utility __Download\RunAsCurrentUser.exe

waithidden __Download\RunAsCurrentUser.exe regedit /s temp.reg

//move __appendfile wizardedit.reg

//waithidden regedit /s “wizardedit.reg”

(imported comment written by Jim23)

Hello Carroll,

I’m not quite sure what the question is. Are you saying it worked on your machine?

(imported comment written by carroll91)

Jim,

I ran the job in BF to my asset-PC and it did not fail. The job showed as Not Relevant as below:

IE7 250 MB Cache Increase

BCFS26617 (asset)

Summary

The Fixlet which this action addresses is not relevant on this machine.

Status Not Relevant

Start Time Not Executed

End Time Not Executed

Action

Script Type BigFix Action Script

action uses wow64 redirection false

delete __appendfile

delete wizardedit.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

appendfile “CacheLimit”=dword:0003EBE8

copy __appendfile temp.reg

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320 http://software.bigfix.com/download/bes … er-2.0.exe

utility __Download\RunAsCurrentUser.exe

waithidden __Download\RunAsCurrentUser.exe regedit /s temp.reg

Thanks, Carroll.

(imported comment written by Jim23)

What relevance are you using to target machines? It appears that it did not run at all on your asset machine because it says it was not relevant? Is that correct?

(imported comment written by carroll91)

I ran the task to my asset and it showed as not relevant. I did notice a server http error message?

IE7 250 MB Cache Increase

BCFS26617

Summary

The Fixlet which this action addresses is not relevant on this machine.

Status Not Relevant

Start Time Not Executed

End Time Not Executed

IE7 250 MB Cache Increase

Single Action

Issued 09-09-15 12:52:17 PM by cmacdona

Status

0 Applicable Computers

Status

Count

Percentage

Downloads

File

Status

Details

bes

Failed

Server error: “HttpRestartableBadHttpStatus”

11 of 432 retries: next attempt in 00:10:00

Source

This action’s source is the Task “IE7 250 MB Cache Increase” in the “Desktop Services” site.

Behavior

Messages

No user interface will be shown before running this action.

No message will be shown while running this action.

Users

This action will run independently of user presence.

User interface will be shown to all users.

Execution

This action starts 09-09-15 12:52:00 PM and ends 09-09-17 12:52:00 PM, client local time.

It will run at any time of day, on any day of the week, .

If the action becomes relevant after it has successfully executed, the action will not be reapplied.

If the action fails, it will not be retried.

Post-Action

No operations will occur after the action completes.

Details

Relevance

(

name of operating system = “WinXP”

OR

name of operating system = “WinXP-2003”

)

AND

(

exists value “CacheLimit”

whose

(

“3EBE8” != it as string as hexadecimal

)

of key "HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content " of native registry

)

(name of operating system = “WinXP” OR name of operating system = “WinXP-2003”) AND (exists value “CacheLimit” whose (“3EBE8” != it as string as hexadecimal) of key "HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content " of native registry)

Success Criteria

This action will be considered successful when it runs to completion.

Action Script

Script Type BigFix Action Script

action uses wow64 redirection false

delete __appendfile

delete wizardedit.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

appendfile “CacheLimit”=dword:0003EBE8

copy __appendfile temp.reg

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320 http://software.bigfix.com/download/bes … er-2.0.exe

utility __Download\RunAsCurrentUser.exe

waithidden __Download\RunAsCurrentUser.exe regedit /s temp.reg

//move __appendfile wizardedit.reg

//waithidden regedit /s “wizardedit.reg”

Thanks Jim.

(imported comment written by Jim23)

Hello Carroll,

Here are a few suggestions.

  1. It looks like it’s failing because runascurrentuser.exe is not being downloaded. Copy and paste the link in a browser to make sure it is a good link.

  2. Make sure you check that the relevance evaluates to true using the debugger on your machine.

It looks like in your relevance you are checking for the setting in HK_USERS

of key "HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content " of native registry

and in your action you are trying to change the logged on user:

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

(imported comment written by SystemAdmin)

This looks like another situation where my technique of for examining the “Current_User” portion of the registry would help. S-1-5-18 is the well-known SID for the SYSTEM account. Take a look at the code in this thread:

http://forum.bigfix.com/viewtopic.php?id=3757

I know I sound like a broken record bringing this up in thread after thread, but I think it is better than downloading an app to run as another user. It also allows you to check to see if the change is needed with relevance, which is what would really help in this particular situation.

(imported comment written by carroll91)

Here is the code that worked for me. Handy to increase cache for a web based app we are using. Bumps it up from 65 to 250 mb.

Relevance

(name of operating system = “WinXP” OR name of operating system = “WinXP-2003”) AND (exists value “CacheLimit” whose (“3EBE8” != it as string as hexadecimal) of key “HKEY_USERS\S-1-5-18\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content” of native registry)

Action

action uses wow64 redirection false

delete __appendfile

delete wizardedit.reg

appendfile Windows Registry Editor Version 5.00

appendfile

appendfile

http://HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content

appendfile “CacheLimit”=dword:0003EBE8

copy __appendfile temp.reg

prefetch RunAsCurrentUser.exe sha1:a72371f4e968da7ead24f0f4e68c14b234ac94f6 size:184320 http://software.bigfix.com/download/bes/util/RunAsCurrentUser-2.0.exe

utility __Download\RunAsCurrentUser.exe

waithidden __Download\RunAsCurrentUser.exe regedit /s temp.reg

Thanks for the help everyone as I learn this stuff. Great forum!