×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

(OP)
Hi Everyone,
I created a batch file for a particular user, to shutdown, his SBTW.EXE, as he always leave SBT OPEN, and also he is logged into one of the modules(in his case PO)

Ok, i can kill SBT process but the next time, he open SBT to login, he will be lock and then i will need to go to System Manager to unlock him.

Below it is a small batch file, that kill the "SBTW.EXE PROCESS" but do not actually log off the user from SBT, i am wondering if anyone can point me to how, i can integrate in a batch file or any other method, to log off the user from his instance of SBT and close SBT , as this is an old man, that always forget before he leave, to exit SBT.

Here is batch file i am running from the scheduler:

echo on
ECHO "CLOSING SBT..."
taskkill /F /IM sbtw.exe /T
c:\windows\system32\shutdown -s -f -t 35
exit

Any help very well appreciated
Thanks in advance

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

Not recommended. You will eventually encounter data corruption.
Edgar
Integrated Bar Code Systems,Inc.

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

(OP)
Hi Edgar,
Anyway this user, always leave the SBT open, and anyway the next day in the morning, i always have to unlock him, it seem like the backup system we have disconnect him, so the next day, i always has to use SM and unlock him, the solution is, that he quit SBT but i cannot chase all users everyday and he keep forgetting to do it.

1-do you know, the table where i can access the login, probably then i can log him out first ?

2-then kill SBTW.EXE, or find the prg or procedure where the code to exit SBT is written ?

3-as SBT main form, does not have enable the close button, that is why the "X" does not close SBT
Thanks

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

Hi Landfla,

It seems we got the same problem dealing with the so called "senior citizen" employee, hehehe... No offend please, because they are not totally that age but almost there. Others are really forgotten for properly closing the system specially during rush hour, emergency call and alike. When your batch file execute on the triggered time you had set aside, Chances are, on the next log on, they are block. To fix..., as you said, clear the userlock in System Manager module. This is annoying in our part if done regularly.

Your principle is good (2nd msg) but as what Edgar said, this is not recommended, and I agree him, although I am doing this my own. I can suggest you solution just like what I did in our SBT, but take a risk on the effect ( a lot of things to describe how and why). Although there is nothing an issue if you religiously doing a BACKUP. Probably, indexes might be affected in this action, but no worries, you can immediately address it in your own in case happen. But so far, I have no encounter problem yet for the past 10years in this program.

Solution:
1. Create a program to reset the user account information particularly the log on status.
Filename :syuuser.dbf (folder: \sbtsys\pro50) SBT engine folder.
Fieldname :loginr (.t. is active, .f. is not yet log on)

In the program, ask the UserID and seek it in the syuuser.dbf and write;
replace syuuser.loginr with .f. &&code to make user log again free on the next session.
You can also EMPTY "logina",(module) and "loginc", companyID to make sure.
2. Compile it as .exe file so that you can load it in your batch file w/c is a line before the KILL task in DOS command(In you batch file)
3. Hope this solve the problem.
4. Good luck.


junmagoncia

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

(OP)
Hi junmagoncia,

Thanks for the advise and the instructions, i will give a try why not ?

Now can you please, clarify what this mean "w/c" ?
sorry i don't get it

Thanks
Ernesto

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

Hi landfla,

There's nothing big in the term "W/C", because it's just a short spelling that stand for "WHICH".

"2. Compile it as .exe file so that you can load it in your batch file WHICH is a line before the KILL task in DOS command(In you batch file)"[i]

... Dont worry in the technical side and chances of being corrupt. Basically, time trigger you have to put in Windows is after office hour. Meaning your workstation is already standby mode and SBT activities is at rest. 99% safe and giving only 1% for bad scenario. I am assuring safe because, if 1% materialize this requires only minimal manipulation to restore system files and no need of highly-skilled programmer to do it, provided that BACKUP IS WELL OBSERVED. And another assurance is that we don't have experience a problem since our implementation date, Aug 7 2006 .


Hope this clarify your query.

Best,

junmagoncia

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

By the way Ernesto, if you noticed that my solution is to create a program but ask to enter the userID (program intervention) w/c is a redundant process because System Manager (SM) do this. In our side, this is intentional for control purposes so that in the audit trail, we can count how many attempt the user do not log out SBT. And put a little bit discipline to that user. SBT has a log (syusess.dbf), but a log for all activities. So to make it customized in our own process, I did my own to control it.

And if you need a fully automatic and no intervention requires, you can write a program (userclr.prg).
Assuming SBT engine network map drive is (q:\sbtsys\pro50)

***code start here
close data
set safe off
set conf off
set echo off
use q:\sbtsys\pro50\syuuser SHARED
replace all loginr with .f. &&code to make user log again free on the next session.
replace all logina with "" &&an application
replace all loginc with "" &&a companyID
***end of routine

Compile this as userclr.exe

In your batch file...
echo on
userclr
ECHO "CLOSING SBT..."
taskkill /F /IM sbtw.exe /T
c:\windows\system32\shutdown -s -f -t 35
exit

Of course I expect you know already how to create task in windows control panel and schedule your batch file and what time you wanted to be triggered.

Good luck.


junmagoncia

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

(OP)
Hi junmagoncia,
Thanks a billion for your concern and for helping, to be honest, i know a few person from your country, and the all, are very smart and always helping others, good pepole, thanks a lot.
Ernesto

RE: SBT PRO 5.0, shutdown SBT FROM A BATCH FILE

Hi Ernesto,

I was sincerely touched with that very unexpected message from you. I did not expect appreciation like that from other country and truly encourage me more to share. This is one of the things that money can't buy...

I know a lot out there are willing to help too. Just happen that I have a little knowledge of your concern and I was doing the right thing, share.

I just want to keep SBT System alive. That's it. I loved this Accounting System. Though they says, its already old but look, no other system that offers the fastest performance even after several years of usage except SBT System. We are SBT user since year 2000 but our recording retro from 1998 up to the present. Its already millions of records and imagine how big is our databases. MSSQL is five times bigger than .DBF, making xbase family files lighter than other database. In us, both SBT system and customized report (external system for reporting purposes and others due to limited SBT report), done in a seconds or less than a minute for reports such as, sales report, customers ledger, collection reports, stock card (inventory) and others in various presentation. Meaning AGING of SBT is not a problem. Sales report in the past five years in an instance is completed in less than a minute and how it was created..., it depend on the strategic approach of the programmer and in this scope of information to be gathered, I personally discourage the use of the SQL Statement, because if you do, you are running a program like other system did, too slow and worse, might encounter the "internal inconsistency error" along the process.

But anyway, thank you for recognizing me and my country. From the bottom of our heart,... THANK YOU.

Best,

junmagoncia

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close