Page 1 of 1 1
Topic Options
#125550 - 2004-08-24 04:15 PM Set Default homepage of users.
SouthWind Offline
Lurker

Registered: 2004-08-24
Posts: 1
Loc: Kansas
Hi All,

I did a search but could not find the answer I need.

How can I set the default homepage of my users via my .kix?

Thanks!

Top
#125551 - 2004-08-24 04:19 PM Re: Set Default homepage of users.
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
That should better be done by policies ... Well, you haven't talked yet about your environment, only about your Users

I found at least one topic : this one

but still, forcing this with policies is much more efficient


Edited by Jochen (2004-08-24 04:22 PM)
_________________________



Top
#125552 - 2004-08-24 07:48 PM Re: Set Default homepage of users.
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Hello SouthWind and Welcome to the board.

Just an FYI that this board has a GREAT FAQ section as well as a ton of UDF (User Defined Function) to help assist you in accomplishing just about any scripting task.

Here is an example of a script to peform such modifications, but Jochen is correct in that a Policy would be a better approach.

DO NOT run this code as is, but rather review what it does and modify it to your needs.


Code:
Break On
Dim $SO
$SO=SetOption('Explicit','On')
$SO=SetOption('NoVarsInStrings','On')

UpdateIESettings()
Dim $SetURL,$FavKey
$FavKey=ReadValue('HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders','Favorites')
$SetURL=wshShortcut($FavKey+'\Links\MSN',"http://www.msn.com")
$SetURL=wshShortcut($FavKey+'\Links\Google',"http://www.google.com")
$SetURL=wshShortcut($FavKey+'\Links\Yahoo',"http://www.yahoo.com")

Function UpdateIESettings()
Dim $AutoConfigURL,$SetAutoConfigURL,$ProxyServer,$ProxyOverride,$SetIECache,$IEKey,$SetProxyEnable,
$SetMaxConnectionsPerServer,$SetMaxConnectionsPer1_0Server,$SetProxyServer,$SetProxyOverride,$IEUser,
$DisableDebug,$DisableDlg,$DisableSugFrmPass,$DisableAskSugFrmPass,$EnableFormSuggest,$AutoComp,
$EnableAutoSuggest,$SetStartPage,$URL
$URL='http://www.google.com'
$IEKey='HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings'
$IEUser='HKCU\Software\Microsoft\Internet Explorer\Main'
$AutoComp='HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete'
$AutoConfigURL = Iif(@DOMAIN='Domain1','http://server1.com/proxy.pac','http://server2.com/proxy.pac')
$ProxyOverride='mycompany.com;*.some.other.site.com;<local>'
$ProxyServer='my.proxy.server.name.com:8080'
$SetIECache=WriteValue($IEKey,'SyncMode5', 3, REG_DWORD)
$SetMaxConnectionsPerServer=WriteValue($IEKey,'MaxConnectionsPerServer',15,REG_DWORD)
$SetMaxConnectionsPer1_0Server=WriteValue($IEKey,'MaxConnectionsPer1_0Server',15,REG_DWORD)
$SetProxyEnable=WriteValue($IEKey, 'ProxyEnable', 1, REG_DWORD)
$SetAutoConfigURL=WriteValue($IEKey,'AutoConfigURL',$AutoConfigURL,REG_SZ)
$SetProxyServer=WriteValue($IEKey,'ProxyServer',$ProxyServer,REG_SZ)
$SetProxyOverride=WriteValue($IEKey,'ProxyOverride',$ProxyOverride,REG_SZ)
$SetStartPage=WriteValue($IEUser,'Start Page',$URL,REG_SZ)
$DisableDebug=WriteValue($IEUser,'Disable Script Debugger','yes',REG_SZ)
$DisableDlg=WriteValue($IEUser,'Error Dlg Displayed On Every Error','no',REG_SZ)
$DisableSugFrmPass=WriteValue($IEUser,'FormSuggest Passwords','no',REG_SZ)
$DisableAskSugFrmPass=WriteValue($IEUser,'FormSuggest PW Ask','no',REG_SZ)
$EnableFormSuggest=WriteValue($IEUser,'Use FormSuggest','yes',REG_SZ)
$EnableAutoSuggest=WriteValue($AutoComp,'AutoSuggest','yes',REG_SZ)
EndFunction

Function wshShortCut($shortcutname,$targetpath,optional $arguments, optional $startdir, optional $iconpath, optional $style,optional $description)
Dim $shell, $desktop, $shortcut, $index, $iconinfo, $iconindex
$shell = CreateObject("wscript.shell")
If $shell
If UCase(Right($shortcutname,4))=".URL" or UCase(Right($shortcutname,4))=".LNK"
;do nothing
Else
If UCase(Left($targetpath,5))="HTTP:" or UCase(Left($targetpath,6))="HTTPS:" or UCase(Left($targetpath,4))="FTP:"
$shortcutname=$shortcutname + ".url"
Else
$shortcutname=$shortcutname + ".lnk"
EndIf
EndIf
If InStr($shortcutname,".lnk") and not Exist($targetpath)
Exit 2
EndIf
If InStr($shortcutname,"\")=0
$Desktop = $shell.SpecialFolders("Desktop")
$shortcutname=$desktop + "\" + $shortcutname
EndIf
$shortcut = $shell.createshortcut($shortcutname)
If $shortcut
$shortcut.targetpath = $targetpath
If $iconpath
$shortcut.iconlocation = $iconpath
EndIf
If $arguments
$shortcut.arguments = $arguments
EndIf
If $startdir
$shortcut.workingdirectory = $startdir
EndIf
If $style
$shortcut.windowstyle = $style
EndIf
If $description
$shortcut.description = $description
EndIf
$shortcut.save
If InStrRev($shortcutname,".url") and $iconpath
$index=InStrRev($iconpath,",")
If $index=0
$iconindex=0
Else
$iconindex=Split($iconpath,",")[1]
$iconpath=Split($iconpath,",")[0]
EndIf
$=WriteProfileString($shortcutname,"InternetShortcut","IconFile",$iconpath)
$=WriteProfileString($shortcutname,"InternetShortcut","IconIndex",$iconindex)
EndIf
$shortcut = 0
$wshshortcut=0
Else
Exit @ERROR
EndIf
Else
Exit @ERROR
EndIf
EndFunction


Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.056 seconds in which 0.029 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org