Can a script log a user off and then log on under a different user?

Can a script log a user off and then log on under a different user?

Post by auxvivresp » Thu, 13 Sep 2007 02:12:36


I have run into a networking issue for which I'm hopeful scripting may
provide a workaround. My knowledge of scripting is very limited and
before I get my feet wet, I'd like to know if a particular task is
possible:

Can a windows script log off of a local profile and then log on to a
domain as a different user?

I am administering a touchscreen workstation running win2k. This
particular terminal has no keyboard and it's ethernet adapter is usb-
based. The ethernet adapter model is a Linksys USB200M. Since there is
no keyboard this machine will need to perform an automatic logon to
the win2k domain.

A problem occurs when performing an automatic logon. Windows 2000
reports that it is unable to retrieve its roaming user profile from
the Windows 2000 Server. I believe this is related to the fact that
the terminal's ethernet adapter is connected via usb and this usb
device driver has not finished loading before the automatic logon is
attempted. In any event, Linksys hasn't been able to offer a solution
to this problem which I believe is related to their device.

There is no problem when logging on manually by typing a username and
password with an attached keyboard. Also, if the user logs off and
then immediately logs on again, the terminal has no problem retrieving
the roaming user profile from the server. The problem only occurs on
the inital boot. This seems to be further evidence that it's an issue
related to the loading of the network adapter's drivers at boot time.

Does anyone have any advice on how I might work around this problem.
Is it possible to automatically log on to a local profile on the
terminal and then run a script which would log the user off and log on
to the network domain and retrieve the roaming profile. This would
essentially automate the process I described in the previous
paragraph, and would not require any user interaction or keyboard
input.
 
 
 

Can a script log a user off and then log on under a different user?

Post by Randy Web » Thu, 13 Sep 2007 05:25:14


XXXX@XXXXX.COM said the following on 9/11/2007 1:12 PM:

[follow-up set to microsoft.public.scripting.wsh]


Via WSH it might, but not from a webpage.
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://www.yqcomputer.com/
Javascript Best Practices - http://www.yqcomputer.com/

 
 
 

Can a script log a user off and then log on under a different user?

Post by Harvey Col » Thu, 13 Sep 2007 06:22:51

The problem most likely is that the driver for the USB Ethernet adapter is
not loaded when the WinLogon process starts and automatically logs the
person on. USB drivers are typically the last to be installed, since the
connected USB device has to be detected, before the driver is loaded. People
have the same trouble with many wireless adapters. If you have SSID turned
off and are using WEP or WPA, I seen it take up to 60 seconds after the
desktop has been displayed before the Wireless adapter makes it's connection
and obtains an IP address.

Microsoft made the WinLogon service less dependent in Windows 2000 to speed
up boot times. I've read about people making the WinLogon service dependent
on the NIC driver, but have never attempted this myself.
 
 
 

Can a script log a user off and then log on under a different user?

Post by auxvivresp » Fri, 14 Sep 2007 13:07:01

> Microsoft made the WinLogon service less dependent in Windows 2000 to speed

This sounds like it may be the solution I'm looking for. I've done
some reading up on WinLogon but I've yet to discover how I can get
WinLogon to wait for the usb NIC driver to finish loading. Is there a
registry key that needs to be created? Is it simply a matter of
increasing a timeout value? Is it a matter of making the WinLogon
service dependent on another service? I'm not familiar with how to
modify service dependencies, any advice?
 
 
 

Can a script log a user off and then log on under a different user?

Post by Vinod Dadh » Fri, 14 Sep 2007 19:40:22


Hi,

You can delay the WinLogon serivce.

Add the dward key

Bootpause value = 120

for example to delay exchange system attendent add

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeSA
\Parameters

Add Dward = Bootpause , value decimal = 120
 
 
 

Can a script log a user off and then log on under a different user?

Post by Paul Baker » Fri, 14 Sep 2007 23:22:47

The instructions in this KB article may also help:

How To Control Device Driver Load Order:
http://www.yqcomputer.com/

Paul
 
 
 

Can a script log a user off and then log on under a different user?

Post by auxvivresp » Sat, 15 Sep 2007 11:51:05

> You can delay the WinLogon serivce.

Thank you for the suggestion. I can't find any online documentation
for such a registry key. I think it may be a function which is
specific to exhance system attendent.
 
 
 

Can a script log a user off and then log on under a different user?

Post by auxvivresp » Sat, 15 Sep 2007 11:58:00

Also,

How to delay loading of specific services:
http://www.yqcomputer.com/

I just came across the aformentioned link and it seems to describe
what I need: Making a service explicitly dependent upon the loading
of another. I don't know what service controls WinLogon, though. Any
ideas?
 
 
 

Can a script log a user off and then log on under a different user?

Post by Mike Jone » Sat, 15 Sep 2007 17:40:36


The article, whilst "reviewed" in Feb 2007, seems dated; on my XP
machine the Netlogon service depends only only LanmanWorkstation
(they've dropped the LmHosts dependency since NT, I'm guessing).


I'd suggest looking at the full bootlog (from safe mode) to identify
your USB network startup.

This appears to not be a scripting problem as such, you might get more
info from asking in a networking group.

Original problem decription appended:



I am administering a touchscreen workstation running win2k. This
particular terminal has no keyboard and it's ethernet adapter is usb-
based. The ethernet adapter model is a Linksys USB200M. Since there is
no keyboard this machine will need to perform an automatic logon to
the win2k domain.

A problem occurs when performing an automatic logon. Windows 2000
reports that it is unable to retrieve its roaming user profile from
the Windows 2000 Server. I believe this is related to the fact that
the terminal's ethernet adapter is connected via usb and this usb
device driver has not finished loading before the automatic logon is
attempted. In any event, Linksys hasn't been able to offer a solution
to this problem which I believe is related to their device.