Opening 1 copy of an application in Terminal Services

  • Thread starter Thread starter Marka
  • Start date Start date
M

Marka

Guest
Hi All

Question - is there any way to limit the number of copies of a program a
user can open?

Background: Users are clicking Navision icon more than once and therefore
opening multiple copies of it, putting a strain on the server

Any advice/solution much appreciated

Mark
 
Re: Opening 1 copy of an application in Terminal Services

This isn't a native feature, so you would have to do some scripting.
In its simplest form, you could start the program from a command
file, something like this (example with Internet Explorer, change to
Navision).
Watch out for wrapped lines in the line starting with "for /f"!

@Echo Off
Set ExeFile=iexplore.exe
Set ExePath=%ProgramFiles%\Internet Explorer

REM ** Check if this user already runs this process
for /f %%j in ('qprocess %username% ^| find /i "%ExeFile%"') do goto
found
REM ** It's not running. Fire it up!
start "Internet Explorer" /B "%ExePath%\%ExeFile%"
exit

:found
REM ** It's already active. Tell the user
echo %ExeFile% is already running!
echo Please do not click the icon multiple times!
REM ** Give the user a chance to read the message and quit
pause
exit
_________________________________________________________
Vera Noest
MCSE, CCEA, Microsoft MVP - Terminal Server
TS troubleshooting: http://ts.veranoest.net
___ please respond in newsgroup, NOT by private email ___

=?Utf-8?B?TWFya2E=?= <Marka@discussions.microsoft.com> wrote on 30
okt 2007 in microsoft.public.windows.terminal_services:

> Hi All
>
> Question - is there any way to limit the number of copies of a
> program a user can open?
>
> Background: Users are clicking Navision icon more than once and
> therefore opening multiple copies of it, putting a strain on the
> server
>
> Any advice/solution much appreciated
>
> Mark
 
Back
Top