Page 1 of 1 1
Topic Options
#195385 - 2009-08-11 05:46 PM Convert VBS to KiXtart
Dom Offline
Just in Town

Registered: 2009-08-11
Posts: 3
Loc: CT
I have the following script that I would love to run directly from KiXtart

Is it possible ?

' Auto-Logout script for Windows.

BSPHostName="172.16.50.1"

Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objHTTP.setOption 2, 13056

objHTTP.open "POST", "https://"+BSPHostName+"/portal/logout", False
objHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.send "purl=&submit=Logout"

Set objHTTP = Nothing

Top
#195391 - 2009-08-12 05:59 AM Re: Convert VBS to KiXtart [Re: Dom]
Gargoyle Offline
MM club member
*****

Registered: 2004-03-09
Posts: 1597
Loc: Valley of the Sun (Arizona, US...
Search the board for "VBS to Kix" Might just find what you need.
_________________________
Today is the tomorrow you worried about yesterday.

Top
#195395 - 2009-08-12 03:25 PM Re: Convert VBS to KiXtart [Re: Gargoyle]
Dom Offline
Just in Town

Registered: 2009-08-11
Posts: 3
Loc: CT
I'll try
Top
#195396 - 2009-08-12 03:57 PM Re: Convert VBS to KiXtart [Re: Dom]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Does this logout your Windows session or log you out of the website you are visiting? If it is Windows then you might want to take a look at the build in Shutdown function.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#195407 - 2009-08-13 08:23 PM Re: Convert VBS to KiXtart [Re: Mart]
Arend_ Moderator Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Code:
$BSPHostName = "172.16.50.1"
$objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
$objHTTP.SetOption(2, 13056)
$objHTTP.Open("POST", "https://"+$BSPHostName+"/portal/logout", NOT 1)
$objHTTP.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
$objHTTP.Send("purl=&submit=Logout")
$objHTTP = ""

Top
#195423 - 2009-08-14 07:04 PM Re: Convert VBS to KiXtart [Re: Mart]
Dom Offline
Just in Town

Registered: 2009-08-11
Posts: 3
Loc: CT
 Originally Posted By: Mart
Does this logout your Windows session or log you out of the website you are visiting? If it is Windows then you might want to take a look at the build in Shutdown function.


This logs me out of the proxy server. - We use a proxy server with authentication to access the web. The proxy server will cache your user name and password and it remembers you by IP (Yes I know - not the most effective way to secure but I didn't design it). I have a number of users that access the web on shared machines. Sine the proxy server remembers the 1st authentication made I needed a way to remove the entry from the proxy server. I was given the above script to do that.

I stuck it into the login script for the hnd full of users that use shared stations. I'd LOVE to do it a shutdown but I don't know how and I don't have avtive directory - Still on NT 4

I found a VBS to EXE converter on the web and I converted the script to exe so I can execute it at login but I'd like to just do it direct from kixtart.

Top
#195425 - 2009-08-14 07:40 PM Re: Convert VBS to KiXtart [Re: Dom]
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11625
Loc: CA
Well things are done a bit differently but there should still be a ton of code on the site that was originally written for an NT4 Domain.

Many things that you can do with AD though are not supported on NT4
KiX has a SHUTDOWN command.

Shutdown( )

Action: Allows you to shut down or reboot a computer.

Syntax: ShutDown ("computer", "message", wait, force, options)

Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 581 anonymous users online.
Newest Members
Audio, Hoschi, Comet, rrosell, PatrickPinto
17880 Registered Users

Generated in 0.054 seconds in which 0.023 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org