Page 1 of 1 1
Topic Options
#81920 - 2002-03-05 04:10 PM W2k+ - Keep the Window visible on login?
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
When we execute our script on login, the screen runs minimized, how do we get it visible?

The basis of this code is from - http://www.winguides.com/registry/display.php/141/
Code:

;*************************************************************************************
; Check the following key for W2k Machines to make the window not run minimized
;*************************************************************************************
IF @dos >= "5.0"
$hklms = 'HKLM\SOFTWARE'
IF 1 <> ReadValue($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
$ = WriteValue ($hklms+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD")
ENDIF
ENDIF



If you run into issues when writing to the Registry - http://www.winguides.com/registry/display.php/1085/
Code:

;*************************************************************************************
; Check the following key for W2k Machines to make the window not run minimized
;*************************************************************************************
IF @dos >= "5.0"
$hkcus = 'HKCU\SOFTWARE'
IF 1 <> ReadValue($hkcus+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync")
$ = WriteValue ($hkcus+"\Microsoft\Windows NT\CurrentVersion\Winlogon", "RunLogonScriptSync", "1", "REG_DWORD")
ENDIF
ENDIF


_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#81921 - 2002-03-09 01:37 AM Re: W2k/XP - Keep the Window visible on login?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
This can also be managed as either a GPO or LGPO. There are four possible locations for this setting. HKCU/HKLM WinLogon/Policies

quote:

RunLogonScriptSync
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Data type Range Default value
REG_DWORD 0 | 1 0

Description
Directs the system to wait for the logon scripts to finish running before it starts the Windows Explorer interface program and creates the desktop.

This entry stores the setting of the Run logon scripts synchronously Group Policy. Group Policy adds this entry to the registry with a value of 1 when you enable the Run logon scripts synchronously policy. If you disable the policy, Group Policy sets the value to 0. If you set the policy to Not configured, Group Policy deletes the entry from the registry and the system behaves as though the value is 0.

Value Meaning
0 The policy is disabled or not configured. Logon scripts and Windows Explorer are not synchronized and can run simultaneously.
1 The policy is enabled. Windows Explorer does not start until the logon scripts have finished running. This setting assures that logon script processing is complete before the user starts working, but it can delay the appearance of the desktop.

Change method
To change the value of this entry, use Group Policy. This entry corresponds to the Run logon scripts synchronously policy (Computer Configuration\Administrative Templates\System\Logon).

Note

This entry appears in both HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER. If the values conflict, the value in HKEY_LOCAL_MACHINE takes precedence over the value in HKEY_CURRENT_USER.

This entry takes precedence over a user setting. When this entry appears in the registry, a policy is in effect and the system ignores the value of RunLogonScriptSync (HKLM) and RunLogonScriptSync (HKCU).

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#81922 - 2003-02-08 07:46 PM Re: W2k/XP - Keep the Window visible on login?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The real purpose of the GPO setting "RunLogonScriptSync" is to force it to run syncronously but it has the added side effect of making it visible. If visibility is your only objective, then take a look at the following:

Topic: FAQ Recommendation

See also, this Topic: Maximize login script window
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 181 anonymous users online.
Newest Members
skygreen2031, amelindarķe, Nims123, davidscroegh, davidscroe
17626 Registered Users

Generated in 0.057 seconds in which 0.026 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