Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ScriptLogic help

Posted on 2007-03-26
7
Medium Priority
?
404 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

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 2000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

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…
Know what services you can and cannot, should and should not combine on your server.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

670 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