Solved

ScriptLogic help

Posted on 2007-03-26
7
398 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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

828 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