Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Google search


Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
33%
Installation Wizard into new VRC
39%
Manual into existing VRC
6%
Manual into new VRC
22%
Total votes: 49

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #16  
Old 23rd June 2013, 08:27
bhushanchanda's Avatar
bhushanchanda bhushanchanda is offline
Guru
 
Join Date: Sep 2012
Location: India
Posts: 2,355
bhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura aboutbhushanchanda has a spectacular aura about
Baan: LN FP 1-9, 10.4, a little bit of Baan IV - DB: SQL Server 2008, Oracle - OS: Windows Server 2008 R2, Unix
Hi Vamsi,

It was not that easy to do the same in Windows (may be coz I am not a command line expert). But, finally its done :)

Thanks for your support!

Created a new thread for Windows Version.
__________________
Regards,

Bhushan

Unless you try to do something beyond what you have already mastered, you will never grow!
Reply With Quote
  #17  
Old 14th July 2018, 22:06
NPRao's Avatar
NPRao NPRao is offline
Guru
 
Join Date: Aug 2001
Location: Pacific NW, USA
Posts: 3,061
NPRao will become famous soon enough
Baan: Baan 4-5,5.2(Reger),LN-6.1,Infor LN-10.x - DB: Oracle,MS-SQL - OS: HPUX, Linux, Windows
Thumbs up

16 years later if the thread/utility is still relevant, here is the Windows version.

Code:
###############################################################################
# PowerShell Script to find which Bshell connection is using a Session code.
# Author - N. Prashanth Rao
###############################################################################
# Platform : Windows 7, 10. 
# Copyright 2018 - by N. Prashanth Rao
# All Rights Reserved 
# Permission to use, copy, modify, and distribute this software 
# and its documentation for any purpose and without fee is 
# hereby granted, provided that the above copyright notice 
# appear in all copies and that both that copyright notice and this
# permission notice appear in supporting documentation.  
# N. Prashanth Rao and Baanboard.com DISCLAIM ALL 
# WARRANTIES WITH REGARD TO THIS  SOFTWARE, INCLUDING
# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND 
# FITNESS, IN NO EVENT SHALL N. Prashanth Rao nor 
# Baanboard.com BE LIABLE FOR ANY  SPECIAL, INDIRECT OR 
# CONSEQUENTIAL DAMAGES OR ANY DAMAGES  WHATSOEVER 
# RESULTING FROM LOSS OF USE, DATA OR PROFITS,  WHETHER 
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER  
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH 
# THE USE  OR PERFORMANCE OF THIS SOFTWARE. 
###############################################################################
# Define Input Parameters
# Mandatory - Baan/LN Input Session or 3-GL Object code.
###############################################################################
# Pre-requisites:
# The BSE, BSE_LOG, BSE_TMP are set as System Environment Variables on the LN 
# Application Server.
# PowerShell Version 5 or above is installed.
###############################################################################
PARAM([Parameter(Mandatory=$true)][string]$SESSIONCODE)
################################################################################
Clear-Host
$BSHCMD = (Get-ChildItem Env:BSE).Value + "bin\bshcmd.exe"

$OUTPUTFILE = New-TemporaryFile
#$bshell_ids = (get-process -name ntbshell).Id
$PROCINFO = (get-process ntbshell -includeusername)

write-host "Bshell Process Id, User using the Session"$SESSIONCODE -ForegroundColor Red -BackgroundColor Yellow
foreach($counter in $PROCINFO) {
    $PARAMS = "-s -p -u5 -w5 " + $counter.Id
#   Start-Process $BSHCMD -ArgumentList $PARAMS -NoNewWindow -Wait -RedirectStandardOutput $OUTPUTFILE -RedirectStandardError $OUTPUTFILE2
    Start-Process $BSHCMD -ArgumentList $PARAMS -NoNewWindow -Wait -RedirectStandardError $OUTPUTFILE

    $SessionFound = Select-String -Pattern $SESSIONCODE -Path $OUTPUTFILE
    if ($SessionFound.Count -gt 0) {
        write-host  $counter.Id $counter.UserName
    }
    Clear-Content $OUTPUTFILE
}

Remove-Item $OUTPUTFILE.FullName -Force
################################################################################
__________________
The art of perfection does not lie in doing extraordinary things but, doing ordinary things extraordinarily well. [-N. Prashanth Rao]
How To Ask Questions The Smart Way,BaaNBoard,NPRao
Reply With Quote
  #18  
Old 17th July 2018, 14:02
mark_h's Avatar
mark_h mark_h is offline
Guru
 
Join Date: Sep 2001
Location: Kentucky, USA
Posts: 7,096
mark_h will become famous soon enough
Baan: Baan 4C4 A&D1 - DB: Oracle - OS: Sun Solaris
I would say it is still relevant.
__________________
Mark

GO Cards!
My latest mantra - make sure you have latest stpapi patches and the latest session object. If on LN then please explore the option of using DAL2 functionality.

Shared Solutions for Baan systems provided free by Baan Board.
Play the Google game and help Baanboard get better rankings. Do your part. Click here to find how.
Reply With Quote
Sponsored Links
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running session without user intervention mprakash Tools Development 1 30th August 2004 06:53
AFS - problem running session in a job aobrien AFS/DDC/OLE: Function servers 15 2nd April 2004 14:51
Payment of blocked supplier pmahto Finance, Invoicing and Integration 1 11th September 2003 20:36
parent session code (without parent source) mbdagla Tools Development 2 11th October 2002 09:25


All times are GMT +2. The time now is 21:08.


©2001-2018 - Baanboard.com - Baanforums.com