PDA

View Full Version : XP logout from the command line?


m westlake
January 8th 04, 12:57 AM
Hi,

I'm trying to figure out how to have windows XP (pro) log out via the
command line. I occationally make use of DOS (or DOS-esque in the case
of XP) batch files to execute command line level arguments via a short
script type program and I'd like to be able to add a line that logs
the user off the machine at the end of the script.

Any suggestions?

Also, if anyone can recommend a source for other command line level
commands, I'd appreciate it.

Thanks,

Matt.
(mwestlake@------REMOVE THIS-----scubadiving.com to email me)

David Candy
January 8th 04, 12:57 AM
Try command line reference in help. Look up shutdown

--=20
----------------------------------------------------------
http://www.g2mil.com/Dec2003.htm
"m westlake" > wrote in message =
om...
> Hi,=20
>=20
> I'm trying to figure out how to have windows XP (pro) log out via the
> command line. I occationally make use of DOS (or DOS-esque in the case
> of XP) batch files to execute command line level arguments via a short
> script type program and I'd like to be able to add a line that logs
> the user off the machine at the end of the script.
>=20
> Any suggestions?
>=20
> Also, if anyone can recommend a source for other command line level
> commands, I'd appreciate it.
>=20
> Thanks,=20
>=20
> Matt.
> (mwestlake@------REMOVE THIS-----scubadiving.com to email me)

Torgeir Bakken (MVP)
January 8th 04, 12:58 AM
m westlake wrote:

> I'm trying to figure out how to have windows XP (pro) log out via the
> command line. I occationally make use of DOS (or DOS-esque in the case
> of XP) batch files to execute command line level arguments via a short
> script type program and I'd like to be able to add a line that logs
> the user off the machine at the end of the script.
>
> Any suggestions?

Hi

shutdown.exe -t 0 -l


--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter

Gord Dibben
January 8th 04, 12:59 AM
Torgeir or whomever.

While we're on this subject........

I dual-boot with Windows 98SE and Windows XP. One Hard Drive, two partitions.

Currently set to boot to XP.

Sometimes I wish to boot into 98SE and I have two options. Change Boot.ini
before re-booting or waiting to select 98SE at re-boot.

Is there a *.bat or *.vbs script I could use so the OS could be selected
before re-boot so's I don't have to sit and wait to select OS or change
Boot.ini before shutdown? I set up two different Boot.ini's and tried a *.bat
file to swap them but ran into problems.

I think one of the Boot Manger Apps could do this, but would prefer *.bat or
*.vbs or something else native to Windows.

Gord



On Mon, 05 Jan 2004 19:33:59 +0100, "Torgeir Bakken (MVP)"
> wrote:

>m westlake wrote:
>
>> I'm trying to figure out how to have windows XP (pro) log out via the
>> command line. I occationally make use of DOS (or DOS-esque in the case
>> of XP) batch files to execute command line level arguments via a short
>> script type program and I'd like to be able to add a line that logs
>> the user off the machine at the end of the script.
>>
>> Any suggestions?
>
>Hi
>
>shutdown.exe -t 0 -l

Google