Solved

ScriptLogic help

Posted on 2007-03-26
7
396 Views
Last Modified: 2013-11-21
Ok folks, here we go:
We need a batch file that will allow a program to run, and when complete, exit from a terminal services session.  The problem arises when we introduce ScriptLogic and the batch file runs and logs off the user immiediatly.  We have tried various DOS enable/Disable, extensions etc. to no avail. Here is the batch file:

@echo off
c:
cd \progra~1\logician
start /wait c:\progra~1\logician\logician.exe mlsetupo.txt
logoff

Any assistance will be greatly appreciated.

Jim
0
Comment
Question by:jwhite273
  • 4
  • 3
7 Comments
 
LVL 8

Expert Comment

by:b0fh
ID: 18794730
Have you tried placing the contents of the script (except "logoff") into another batch file & executing it?

example:

kicker.bat
@echo off
echo Starting logician & waiting for completion...
start /wait logician.bat
logoff


logician.bat
@echo off
echo Starting logician...
"c:\progra~1\logician\logician.exe" mlsetupo.txt

You may also be able to run start /wait cmd /c "c:\progra~1\logician\logician.exe" mlsetupo.txt
and achieve the same results, but I'm not exactly sure.  This question has sirbounty written all over it.  :-)
0
 

Author Comment

by:jwhite273
ID: 18794943
Howdy b0fh,
75% solved with your help so far.  Final problem is the batch file clearing itself and finishing the terminal session logoff.  Using your original ideas for a batch fie within a batch file has done well, we just need the final piece.

Thanks for the help thus far,
Jim
0
 
LVL 8

Expert Comment

by:b0fh
ID: 18794990
Where is it hanging?  Try adding a line w/ the single word EXIT to the end of each file.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:jwhite273
ID: 18795062
Hi b0fh,
Sorry, that didn't help.  What we need is when the application terminates, that the terminal server sessions ends.  Unfortunately, we need to figure this out using batch files.  Scriptlogic seems to need this to do what we need it to do.

Jim
0
 
LVL 8

Accepted Solution

by:
b0fh earned 500 total points
ID: 18795282
What about:  logoff sessionname /server:yourTSmachine  ?
If not, pslogg


from logoff /?

LOGOFF [sessionname | sessionid] [/SERVER:servername] [/V]

  sessionname         The name of the session.
  sessionid           The ID of the session.
  /SERVER:servername  Specifies the Terminal server containing the user
                      session to log off (default is current).
  /V                  Displays information about the actions performed.


0
 

Author Comment

by:jwhite273
ID: 18795783
Hi b0fh,
We're still working on it.  Your suggestions have really given us a direction to work from.  I'll let you know how we're making out.

Jim
0
 

Author Comment

by:jwhite273
ID: 18795911
Hi b0fh,
OK, we got it done.  We had to also add slagent.exe & slclient to the registry runonce as DWORDS.  However, your direction was certainly key in getting us to the right place.

Thanks,
Jim
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now