#207138 - 2013-04-20 06:19 AM
Kix not running for logon scripts using win7. but work OK for winXp
|
Easter_bunny
Fresh Scripter
Registered: 2013-04-11
Posts: 18
Loc: hong kong
|
We have a fully functioning system using windows Xp clients. Our issue is we need to run something similar to get windows 7 clients to loogon like the winXp clients.
We are Using Linux server, based on Ubuntu 10.04 [Karoshi]
This server base gives us all the features we need.
The part failing is when we logon to a windows 7 workstation, the logon scripts are run in 3 main parts and we find the part not working is where we alter the registry <HKEY_CURRENT_USER\> Here is a small sample of the keys that wont work from within the Logon
; Set Registry Variables $keysys="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" $keynet="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Network" $keyexp="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" $keyapp="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\WinOldApp" $keyexa ="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" $keyiec ="HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Control Panel" $keyidr ="HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions" $keyisc ="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache" $keyies ="HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings" $keyier ="HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Restrictions" $keycon ="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Network Connections" $keymmc ="HKEY_CURRENT_USER\Software\Policies\Microsoft\MMC" $keycmd ="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\system" $keyswr ="HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\Safer\"
;Disable Command Prompt $ret=writevalue($keycmd,"DisableCMD","2","REG_DWORD")
;Disable MMC Plugins $ret=writevalue($keymmc,"RestrictToPermittedSnapins","1","REG_DWORD")
;Disable Microsoft Management Console $ret=writevalue($keymmc,"RestrictAuthorMode","1","REG_DWORD")
;Disable Lan connection properties $ret=writevalue($keycon,"NC_LanProperties","0","REG_DWORD")
;Disable New Connection Wizard $ret=writevalue($keycon,"NC_NewConnectionWizard","0","REG_DWORD")
;Disable Task Manager using C+A+D $ret=writevalue($keysys,"DisableTaskMgr","1","REG_SZ")
;Disable Locking Workstation Locking using C+A+D $ret=writevalue($keysys,"DisableLockWorkstation","1","REG_SZ")
;Disable Properties Menu selection - Recycle Bin $ret=writevalue($keyexp,"NoPropertiesRecycleBin","1","REG_DWORD")
;Do not move deleted files to the recycle bin $ret=writevalue($keyexp,"NoRecycleFiles","1","REG_DWORD")
;Disable automatic update $ret=writevalue($keyexp,"NoAutoUpdate","1","REG_DWORD")
;Disable DFS Security Tab $ret=writevalue($keyexp,"NoDFSTab","1","REG_DWORD")
;Disable Security Tab $ret=writevalue($keyexp,"NoSecurityTab","1","REG_DWORD")
;Remove Hardware Tab $ret=writevalue($keyexp,"NoHardwareTab","1","REG_DWORD")
I also tested these key changes with a local run of the file and everything functioned correctly. It is only when we run the script at logon.
We don't want to use Samba4 just yet as it is still mostly experimetal. The main reason we are using Linux servers is the cost of running 6-7 MS Servers is high and we found some very good (for schools) server base [http://www.linuxgfx.co.uk/] If anyone has any ideas I would like to hear them.
Regards Bernai
Edited by Easter_bunny (2013-04-20 06:22 AM)
|
|
Top
|
|
|
|
#207173 - 2013-04-23 09:42 AM
Re: Kix not running for logon scripts using win7. but work OK for winXp
[Re: Easter_bunny]
|
Easter_bunny
Fresh Scripter
Registered: 2013-04-11
Posts: 18
Loc: hong kong
|
another new issue is that I can not run the kix file that resides on the server. \\server_name\netlogon\local.kix
this is being called from a task schedule. set to run at startup. General run the task as SYSTEM Trigger startup action start a program c:\kix\wkix32.exe \\server_name\netlogon\local.kix
The script I am running is
; Set Registry Variables
$keyies ="HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings"
;Disable Reda Write from USB ports
$ubstor = "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\UsbStor"
$ret=writevalue($ubstor,"Start","4","REG_DWORD")
; "Start"=dword:00000004
;Disable add/delete sites from Security Zone
$ret=writevalue($keyies,"Security_zones_map_edit","1","REG_DWORD")
;Disable Changing Policies for any Security Zone
$ret=writevalue($keyies,"Security_options_edit","1","REG_DWORD")
;Use Only Machine Settings for Security Zone
$ret=writevalue($keyies,"Security_HKLM_Only","1","REG_DWORD")
;Reload explorer shell
shell "taskkill /f /im explorer.exe & start explorer.exe"
RETURN
seems it can not access the server netlogon directory if I point to local drive the script works fine.
Berni
Edited by Mart (2013-04-24 09:22 AM) Edit Reason: Please use code tags when posting code.
|
|
Top
|
|
|
|
#207214 - 2013-04-27 06:46 AM
Re: Kix not running for logon scripts using win7. but work OK for winXp
[Re: Lonkero]
|
Easter_bunny
Fresh Scripter
Registered: 2013-04-11
Posts: 18
Loc: hong kong
|
Tried it with actual startup scripts, still nothing. I can run the scripts manually so I know the scripts are good(maybe) I tried to use the following registry mods. again my scripts don't seem to run. ____________________________________________________
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0] "GPO-ID"="LocalGPO" "SOM-ID"="Local" "FileSysPath"="C:\\Windows\\System32\\GroupPolicy\\Machine" "DisplayName"="Local Group Policy" "GPOName"="Local Group Policy"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Shutdown\0] "GPO-ID"="LocalGPO" "SOM-ID"="Local" "FileSysPath"="C:\\Windows\\System32\\GroupPolicy\\Machine" "DisplayName"="Local Group Policy" "GPOName"="Local Group Policy"
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0] "Script"="C:\\script1.bat" "Parameters"="" "ExecTime"=hex(b):00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
________________________________________________________
seems I am missing some little item.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 2419 anonymous users online.
|
|
|