[THIN] Re: OT: VBScript assistance needed
- From: "Braebaum, Neil" <Neil.Braebaum@xxxxxxxxxxxxxx>
- To: <thin@xxxxxxxxxxxxx>
- Date: Tue, 28 Apr 2009 10:03:10 +0100
Unless there's loads of other things to do by script, why not either
just call logoff.exe directly, or in a command file:-
cmd.exe /c logoff.exe
?
Is there other stuff not included that has to be done by vbscript? 'cos
otherwise, I'm seeing loads of lines for one command.
Neil
________________________________
From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Jeremy Saunders
Sent: 28 April 2009 09:59
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: OT: VBScript assistance needed
I've not tested this...just put it together in Notepad, but why
don't you just use the Run method to execute logoff.exe?
Option Explicit
Dim objshell
Set objshell = WScript.CreateObject ("WScript.Shell")
objShell.Run "cmd.exe /c logoff.exe"
Set objshell = Nothing
wscript.quit(0)
Cheers,
Jeremy.
From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Andrew Wood
Sent: Tuesday, April 28, 2009 4:34 PM
To: thin@xxxxxxxxxxxxx
Subject: [THIN] Re: OT: VBScript assistance needed
Is this a pure TS environment? If you've Ctx you could use MFCOM
you could do :-
For each asession in oMFServer.Sessions
Assession.logoff(false)
Next
Where oMFServer is an metaframecom.metaframeserver object for
the current machine
Failing that you could always enumerate the sessions and run a
logoff command for each one.
From: thin-bounce@xxxxxxxxxxxxx
[mailto:thin-bounce@xxxxxxxxxxxxx] On Behalf Of Steve Snyder
Sent: 28 April 2009 02:13
To: thin@xxxxxxxxxxxxx
Subject: [THIN] OT: VBScript assistance needed
trying to implement a logoff in vbscript, a la
set objOS -
getobject("winmgmts:{(Shutdown)}//.root/cimv2").execquery("select * from
win32_operatingsystem where primary=true")
for each objsys in objOS
objsys.win32shutdown 0
next
which works great on a 32bit windows system, not so great on a
64bit windows system. Any ideas how to make this fly on 64bit?
________________________________
Confidentiality and Privilege Notice
This document is intended solely for the named addressee. The
information contained in the pages is confidential and contains legally
privileged information. If you are not the addressee indicated in this
message (or responsible for delivery of the message to such person), you
may not copy or deliver this message to anyone, and you should destroy
this message and kindly notify the sender by reply email.
Confidentiality and legal privilege are not waived or lost by reason of
mistaken delivery to you.
________________________________
*****************************************************************************
This email and its attachments are confidential to the intended recipient. If
this has come to you in error, please notify the sender immediately and delete
this email from your system. You must take no action based on this email, nor
must you copy or disclose it or any part of its contents to any person or
organisation. Please note that email communications may be monitored. The
registered office of Shop Direct Limited is First Floor, Skyways House, Speke
Road, Speke, Liverpool, L70 1AB, registered number 04730752.
Subsidiary companies of Shop Direct Limited include:
Shop Direct Group Financial Services Limited (SDGFS), Shop Direct Financial
Services Limited (SDFS) and Shop Direct Finance Company Limited (SDFC). The
registered office of SDGFS, SDFS and SDFC is Aintree Innovation Centre, Park
Lane, Netherton, Bootle, L30 1SL, registered numbers 05200103 (SDGFS), 04730706
(SDFS) and 04660974 (SDFC). SDFS and SDFC are authorised and regulated by the
Financial Services Authority in respect of arranging insurance products.
Shop Direct Contact Centres Limited (SDCC) and Shop Direct Home Shopping
Limited (SDHS). The registered office of SDCC and SDHS is First Floor, Skyways
House, Speke Road, Speke, Liverpool, L70 1AB, registered numbers 05330323
(SDCC), 04663281 (SDHS).
All companies registered in England.
*****************************************************************************
Other related posts: