Page 1 of 1 1
Topic Options
#212601 - 2017-07-20 04:19 PM KIX logon script starting minimized at logon
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
Hello,

I have a script that runs as a logon script... I was attempting to stay away from a batch file, but it seems this is the only way I can get the window to start maximized.

When running via batch file I can only get WKIX32 to show the console... KIX32 starts minimized

kixtart top of script:
 Code:
Break On
$RC=SetTitle("Logon Script")
$RC=SetFocus("Logon Script")
$RC=SetConsole("ALWAYSONTOP")
Color n+/n
BOX (5,10,18,70,FULL)
Color n+/n
AT ( 7,15) "@TIME"
AT ( 9,15) "Running Logon Script"
Color y+/n
AT (11,15) "Please Wait..."


This doesn't show in either KIX32 or WKIX32... so I utilized a batch file:
 Code:
@ECHO OFF
%0\..\wkix32 %0\..\KIXTART.KIX


This will only show the console when using WKIX32... if I were to replace with KIX32 no console shows.

It also doesn't set the title...

What is going on here? Am I misunderstanding something?

Thank you,
Darren

I guess I posted this in the wrong spot.. oops


Edited by dwsykes (2017-07-20 04:39 PM)

Top
#212604 - 2017-07-21 01:50 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Welcome to KORG!

The User Profile / Login Script field must contain "Kix32.exe Kixtart.kix" (replace with the exact name of your login script.kix file). Anything else may not work properly.

You should also set GPOs to Run Login Script Visible (default is hidden), and should set the DelayedDesktopSwitchTimeout (google it) registry value to ZERO (not 5 as suggested in most articles). This can be done with a GPO setting. Without the DDST setting, the login script will run behind the welcome screen, which displays for 30 seconds by default. Setting it to zero disables it, rather than displaying it for 5 seconds. My Kix login script usually runs in just 2-4 seconds, so the value of 5 would still hide my script.

There's another STRONGLY recommended GPO setting you should make - "Wait for Network at Startup". It is pretty much REQUIRED for proper domain operation and it insures that the network is connected before displaying the login prompt. Adds about 1-2 seconds (on older hardware) after a cold boot, but no affect for simple logon/off times.

Once the two settings I mentioned are made network wide, you should not need any special controls in Kix, although they will insure it runs on-top.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212605 - 2017-07-24 03:14 PM Re: KIX logon script starting minimized at logon [Re: Glenn Barnas]
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
I am currently testing some of this... KIX32.EXE KIXTART.KIX seems to be working so far. I'll take a look at those GPOs.

Thank you for the info! Much appreciated! \:\)


Darren

Top
#212606 - 2017-07-24 08:27 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
Ok... I have set 'DelayedDesktopSwitchTimeout' to 0 and have set 'Run Logon Script Visible' and 'Wait for Network at Startup' to enabled, but my logon script is still starting minimized...


I have changed the start of the script to this for testing... no affect.
 Code:
Break On
$RC=SetConsole("FOREGROUND")
$RC=SetConsole("ALWAYSONTOP")
$RC=SetTitle("Logon Script")
$RC=SetFocus("Logon Script")


BUT if I create a batch file with the following code it DOES always show...
 Code:
@ECHO OFF
%0\..\KIX32.EXE


This isn't making much sense...


Edited by dwsykes (2017-07-24 08:38 PM)

Top
#212607 - 2017-07-25 06:41 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Darren,

What OS platform/version?
Which Kix version?

Can you provide the results of a "GPRESULT /R" command? You might have conflicting GPO settings - wouldn't be the first time I've seen that, especially if your environment has had many admins supporting it over time. Once you get this report, you can look at the GPOs and see if more than one might be setting the login script visibility values. Also - confirm that this is set in the user profile and you aren't running a GPO based logon script.

The latest version of W-10 defaults to use PowerShell instead of the command prompt. I didn't see this issue when I tested this release a few weeks back, but forcing CMD.EXE to start Kix would resolve any issue that PS had launching it, so something to consider if you're on release 1703.

Also - running Kix32.exe without args is supposed to find/run "Kixtart.kix", but some versions were buggy and did not start this correctly - that's why it's preferred to always specify the script, even in the batch file.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212612 - 2017-07-27 02:56 PM Re: KIX logon script starting minimized at logon [Re: Glenn Barnas]
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
Glenn,

We are using both Windows 7 and Windows 10 Build 1703.
Kix version is 4.67.

I will edit the batch file to reflect your suggestion.
 Code:
@ECHO OFF
KIX32.EXE KIXTART.KIX


Windows 10 Build 1703 is hiding the logon script no matter what I seem to change... so I will have to make some changes to accommodate that issue as well.

GPRESULT /R Output:
Warning, Spoiler:

Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0
Copyright (C) Microsoft Corp. 1981-2001

Created On 7/27/2017 at 8:44:48 AM


RSOP data for XXXXX\Darren on IT-DSYKES : Logging Mode
-------------------------------------------------------

OS Configuration: Member Workstation
OS Version: 6.1.7601
Site Name: Default-First-Site-Name
Roaming Profile: N/A
Local Profile: C:\Users\Darren
Connected over a slow link?: No


COMPUTER SETTINGS
------------------
CN=IT-DSYKES,OU=Computers,OU=! Information Systems,DC=internal,DC=XXXXX,DC=com
Last time Group Policy was applied: 7/27/2017 at 8:27:30 AM
Group Policy was applied from: svr-ad-03-vm.internal.XXXXX.com
Group Policy slow link threshold: 500 kbps
Domain Name: XXXXX
Domain Type: Windows 2000

Applied Group Policy Objects
-----------------------------
Test Mapped Drives
Set Printer Search
Enable Screensaver
Certificate Auto-Enrollment Policy
Enable Screensaver at Logon Win7 and Screen display off
Standard Desktop
Rename local administrator account
NVIDIA Control Panel Settings
Power Button Action Win7
802.1x XXXXX SSID
Default Domain Policy
Enable DES for Windows 7
Bigfix Installer Startup Script
Global Settings Policy
Windows Firewall Policy
Local Group Policy

The computer is a part of the following security groups
-------------------------------------------------------
BUILTIN\Administrators
Everyone
BUILTIN\Users
NT AUTHORITY\NETWORK
NT AUTHORITY\Authenticated Users
This Organization
IT-DSYKES$
Domain Computers
Authentication authority asserted identity
CERTSVC_DCOM_ACCESS
System Mandatory Level


USER SETTINGS
--------------
CN=Darren Sykes,OU=Users,OU=! Information Systems,DC=internal,DC=XXXXX,DC=com
Last time Group Policy was applied: 7/27/2017 at 8:42:05 AM
Group Policy was applied from: svr-ad-03-vm.internal.XXXXX.com
Group Policy slow link threshold: 500 kbps
Domain Name: XXXXX
Domain Type: Windows 2000

Applied Group Policy Objects
-----------------------------
Test Mapped Drives
Set Printer Search
Enable Screensaver
Certificate Auto-Enrollment Policy
Enable Screensaver at Logon Win7 and Screen display off
Standard Desktop
Rename local administrator account
NVIDIA Control Panel Settings
Power Button Action Win7
802.1x XXXXX SSID
Default Domain Policy
Enable DES for Windows 7
Bigfix Installer Startup Script
Global Settings Policy
Windows Firewall Policy
Local Group Policy

The user is a part of the following security groups
---------------------------------------------------
Domain Users
Everyone
BUILTIN\Administrators
BUILTIN\Users
NT AUTHORITY\INTERACTIVE
CONSOLE LOGON
NT AUTHORITY\Authenticated Users
This Organization
LOCAL
GG_ShrCOperations
Workstation Admins
AW-MDM Users
AW-MDM Test Users
Remote Admin
SharePoint Admins
Mobile Device Users
VPNUsers
Ironport Exception Users
SSAdmin
CanonWideFormat
AW-MDM IS
GG_ShrIS
Application Support
IS
Software Analyst Monitoring
KACE-Admins
ISSupport
Authentication authority asserted identity
CERTSVC_DCOM_ACCESS
High Mandatory Level


Darren


Edited by dwsykes (2017-07-27 03:08 PM)
Edit Reason: more info

Top
#212635 - 2017-08-18 05:04 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
I am still getting some mixed results. I have also disabled the Welcome Screen on about 30 machines now... and we do see the script on these sometimes, but it's almost like the machines aren't getting a connection to the domain controllers at the right time...
Top
#212641 - 2017-08-24 09:16 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
AHA! Does the problem appear more after a power-on or reboot than a simple log-off/on?

If so, you should enable the Wait for Network at Startup in Group Policy. It's a good idea to enable this on any domain, regardless, and only adds a second or two to the boot process before the login prompt appears - has no effect on simple logoff/on.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#212663 - 2017-09-06 03:00 PM Re: KIX logon script starting minimized at logon [Re: Glenn Barnas]
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
*I am getting with our Network Administrators to apply that setting to Group Policy*

I manually changed the setting on a few machines and they do see the script and it seems to help, but Windows 10 still is being a pain.

Check this out... If I use 'KIX32.EXE KIXTART.KIX' under the AD profile instead of LOGON.BAT, the script is always hidden on Windows 7 machines.

Top
#212664 - 2017-09-06 03:38 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
Allen Administrator Offline
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4560
Loc: USA
For the record, I've been seeing some inconsistencies as well, mostly with Win10 1703. Sometimes it displays as it should and others it's hidden or behind "Please wait...".

I've been looking but aside from 1703 I can't find anything out of the ordinary.

Top
#212665 - 2017-09-06 03:44 PM Re: KIX logon script starting minimized at logon [Re: Allen]
dwsykes Offline
Fresh Scripter

Registered: 2017-07-20
Posts: 9
Loc: North Carolina
This is exactly what I am seeing... (we are using v1703)

This however does seem to work, but rather displeasing to users

SetConsole("MAXIMIZE")

GIANT logon script mode \:D


Edited by dwsykes (2017-09-06 03:49 PM)

Top
#212666 - 2017-09-06 05:11 PM Re: KIX logon script starting minimized at logon [Re: dwsykes]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4401
Loc: New Jersey
Question regarding not seeing the login script - have you set the DelayedDesktopSwitchTimeout to zero? (try manually on an affected machine, then deploy via GPO).

See this article from: technet.

I've been setting this to zero instead of the suggested "5" for years for all of our clients.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

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
0 registered and 491 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.067 seconds in which 0.026 seconds were spent on a total of 13 queries. Zlib compression enabled.

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