But yep, that works much better - 2 platforms, 1 script.
J Good point. He asked for logoff in a vbscript. I just looked at it differently…but you've asked the obvious question.
From: thin-bounce@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Braebaum, Neil
Sent: Tuesday, April 28, 2009 5:03 PM
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@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Jeremy Saunders
Sent: 28 April 2009 09:59I'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@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Andrew Wood
Sent: Tuesday, April 28, 2009 4:34 PM
To: thin@freelists.org
Subject: [THIN] Re: OT: VBScript assistance neededIs 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@freelists.org [mailto:thin-bounce@freelists.org] On Behalf Of Steve Snyder
Sent: 28 April 2009 02:13
To: thin@freelists.org
Subject: [THIN] OT: VBScript assistance neededtrying 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.
********************************************************************************
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.
No comments:
Post a Comment