Running a command line command using internal script variables

Running a command line command using internal script variables

Post by igbage » Sun, 11 Mar 2007 01:11:41


Hi,
I'm trying to use this script to extract variables to use as input to
the windows logoff command.

**********************
if ucase(username)=ucase(session.UserName) then
WScript.Echo " Client Name : " & Session.ClientName
WScript.Echo " App Name : " & Session.AppName
theSessionID = Session.SessionID
theServer = Session.ServerName
End if

Next

'Below is the command line command I would like this script to run.

'logoff theSessionId /server: theServer

*************************

This is a .wsf script
I have not idea how to do this so any and all help is appreciated.
Thank you!
 
 
 

Running a command line command using internal script variables

Post by asdf » Mon, 12 Mar 2007 17:38:58

his is a multi-part message in MIME format.


Exercise with one line of script.

Use command lines.

There your input is legible [readable].

-------------------

You are already 'killing' yourself with
some
object syntax, trying to translate
strings back and forth
at the same time.


-------------------

Being it jscript, vbs or whatever



"igbagel" < XXXX@XXXXX.COM > wrote in
message
news: XXXX@XXXXX.COM ...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.3790.1830" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=2>Exercise with one line of script.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Use command lines.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>There your input is legible [readable].</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>-------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>You are already 'killing' yourself  with
some</FONT></DIV>
<DIV><FONT size=2>object syntax, trying to </FONT><FONT size=2>translate strings
back and forth</FONT></DIV>
<DIV><FONT size=2>at the same time.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>-------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Being it jscript, vbs or whatever</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>"igbagel" <</FONT><A href="mailto: XXXX@XXXXX.COM "><FONT
size=2> XXXX@XXXXX.COM </FONT></A><FONT size=2>> wrote in message </FONT><A
href="news: XXXX@XXXXX.COM "><FONT
size=2>news: XXXX@XXXXX.COM </FONT></A><FONT
size=2>...</FONT></DIV><FONT size=2>> Hi,<BR>> I'm trying to use this
script to extract variables to use as input to<BR>> the windows logoff
command.<BR>> <BR>>
**********************<BR>>          
if ucase(username)=ucase(session.UserName)
then<BR>>           
WScript.Echo " Client Name : " &
Session.ClientName<BR>>           
WScript.Echo " App Name    : " &
Session.AppName<BR>>          
theSessionID =
Session.SessionID<BR>>          
theServer =
Session.ServerName<BR>>          
 
 
 

Running a command line command using internal script variables

Post by asdf » Mon, 12 Mar 2007 17:48:21

his is a multi-part message in MIME format.


You could use (ms) LogParser activeX,

mode 'textline' etc.,

which gives you lines or name value
pairs

of an output file as IN OUT READ WRITE
SQL FORMAT.

----------------

Or is it one of those nasty 'output'
files with an atti-dude ?



-------------------------------------------

http://www.logparser.com/


Script Center

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07

Uuups

http://www.securityfocus.com/infocus/1712



"igbagel" < XXXX@XXXXX.COM > wrote in
message
news: XXXX@XXXXX.COM ...

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.3790.1830" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT size=2>You could use (ms) LogParser activeX,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>mode 'textline' etc.,</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>which gives you lines or name value pairs</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>of an output file as <FONT color=#008080><STRONG>IN OUT
READ WRITE SQL FORMAT</STRONG>.</FONT></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>----------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Or is it one of those nasty 'output' files with an
atti-dude ?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>-------------------------------------------</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><A
href="http://www.logparser.com/">http://www.logparser.com/</A></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Script Center</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><A
href="http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07">http://www.microsoft..com/downloads/details.aspx?displaylang=en&FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07</A></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Uuups</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2><A
href="http://www.securityfocus.com/infocus/1712">http://www.securityfocus.com/infocus/1712</A></FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FO