HowTo prevent BOL getting Online help

,

Many servers are not connected to the internet.
If you launch Books Online for the first time, it will try to connect to the net and it may get stuck if there is no internet connection.
You can add these reg-keys after initial sqlserver installation, so it will not perform the online search.

Bol will use these settings when a user lauches it for the first time.

So you can still install and use BOL on your db-servers without the need for an internet connection.

-- Johan Bijnens - ALZDBA dd 20080506
/*
Many servers are not connected to the internet.
If you launch Books Online for the first time, it will try to connect to the net and id may get stuck if there is no internet connection.
You can add these reg-keys so it will not perform the online search.
*/
/* preventing SQL Bools Online to go search for internet resources
 *  mainly because most servers are not connected to the internet
 *  and therefor we don't need to wait to reach the timeout delay !
 */

SET nocount ON 
create table #tmpRegValues (Value varchar(50), Data varchar(1000))
insert into #tmpRegValues 
exec master..xp_regenumvalues N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help'

-- HKEY_LOCAL_MACHINE, then SOFTWARE, then Microsoft, then Microsoft SQL Server, then 90, then Tools, then Shell, then Help.
-- 3. Right-click on Help, point to Add, then select DWORD Value.
-- 4. Rename the key from the default New Value #1 to UseOnlineContent.
-- 5. Double-click the new key and change the value to 0. -- 0 = off 1 = on

if not exists (select * from #tmpRegValues where Value ='UseOnlineContent' and Data = '0')
 begin
   print @@servername + ' Key UseOnlineContent to be installed.'
   declare @NumericValue int
   set @NumericValue = 0

   exec xp_regwrite @rootkey='HKEY_LOCAL_MACHINE',
				@key='SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help',
				@value_name='UseOnlineContent',
				@type='REG_DWORD',
				@value=@NumericValue

   set @NumericValue = 1
   exec xp_regwrite @rootkey='HKEY_LOCAL_MACHINE',
				@key='SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help',
				@value_name='OnlineF1DialogShown',
				@type='REG_DWORD',
				@value=@NumericValue

/*
   exec xp_regwrite @rootkey='HKEY_LOCAL_MACHINE',
				@key='SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help',
				@value_name='UseMSDNOnlineF1',
				@type='REG_DWORD',
				@value=@NumericValue

   exec xp_regwrite @rootkey='HKEY_LOCAL_MACHINE',
				@key='SOFTWARE\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help',
				@value_name='UseMSDNOnlineF1First',
				@type='REG_DWORD',
				@value=@NumericValue
*/
 end
else
 begin
   print @@servername + ' key already installed.'
   select cast(@@servername as char(25)) as ServerNaam, * 
	from #tmpRegValues 
	where Value ='UseOnlineContent'
 end
drop table #tmpRegValues


/*
Or create a bol.reg file containing
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help]
"UseOnlineContent"=dword:00000000

[HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\90\Tools\Shell\Help]
"OnlineF1DialogShown"=dword:00000000


*/

Rate

Share

Share

Rate