Hi all,

This is possibly a question better put to a wider community but it stems directly from a cygwin/sh script I've written to jump into the installation of applications using unattended. (Script to be mailed here when it works!)

The script (addapp.sh) sets up everything necessary for unattended installation of applications using the usual autolog.pl, mapznrun.bat, tempcred.bat, permcred.bat invocations. After the script has been run, the system will automatically log in as an administrative user at the next reboot, lock the console and install applications as required.

My problems stems at this stage in the process: There may or may not be a user logged into the machine when the script is run. (I'm planning semi-automated installation of applications.) What I would like to do is to determine whether a user is logged in or not. (If not, the machine can re-boot immediately.) If there is a user logged in, what I think I need to do is to create a logoff script for that specific user to force the machine to reboot when the user logs out.

So: a question to those experienced with Win 2K/XP: How to I find out if there is a user logged in on the console (Remotely logged in users might also be relevant - but that's for revision 2 (-: ) and, if there is, how do I set up a logoff script for that user? Or perhaps there's a way of setting up a logoff script for the machine? Or, better still, force the machine to re-boot when a user logs out?

I have Activeperl and cygwin installed on each machine. I can copy across further binaries from \\ntserver\install if necessary but would prefer not to have to install an additional application. (Chicken and egg.)

As I write, I realise that one possible solution is to wait until the machine is next rebooted by gracefully exiting the 'lock workstation / mapzrun.bat' startup routine. Some of our machines can go a long time without being rebooted. Forcing a reboot is also possible but a little unfriendly on users who might be running time-consuming processes.

All pointers welcome!

Yours,

Frank


------------------------------------------------------- This SF.Net email is sponsored by: SourceForge.net Broadband Sign-up now for SourceForge Broadband and get the fastest 6.0/768 connection for only $19.95/mo for the first 3 months! http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click _______________________________________________ unattended-info mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to