EMSRV on Windows 8.1

179 views
Skip to first unread message

Louis LaBrunda

unread,
Sep 1, 2014, 6:01:20 PM9/1/14
to va-sma...@googlegroups.com
Hi All,

I'm trying to get EMSRV installed as a service on Windows 8.1 but I'm having some trouble.  Has anyone done this before?  Any help is appreciated.

Lou

Richard Sargent

unread,
Sep 2, 2014, 12:24:02 PM9/2/14
to va-sma...@googlegroups.com
On Monday, September 1, 2014 3:01:20 PM UTC-7, Louis LaBrunda wrote:
I'm trying to get EMSRV installed as a service on Windows 8.1 but I'm having some trouble.  Has anyone done this before?  Any help is appreciated.

Which version of Windows 8.1? Remember, it won't run on the "Home" edition.

Louis LaBrunda

unread,
Sep 2, 2014, 1:28:04 PM9/2/14
to va-sma...@googlegroups.com
Hi Richard,
It says "Windows 8.1 Full Version" but I don't think that is the "Pro" version.  Why won't it run on the "Home" edition?  It ran on my home edition of Windows 7.

I am now able to get EMSRV installed as a service but it stops shortly after starting.

Lou

Richard Sargent

unread,
Sep 2, 2014, 2:03:08 PM9/2/14
to VA Smalltalk
On Tue, Sep 2, 2014 at 10:28 AM, Louis LaBrunda <L...@keystone-software.com> wrote:
It says "Windows 8.1 Full Version" but I don't think that is the "Pro" version.  Why won't it run on the "Home" edition?  It ran on my home edition of Windows 7.

I am now able to get EMSRV installed as a service but it stops shortly after starting.


Hi Lou,

I believe EMSRV requires the "Act as Part of the Operating System" privilege and that privilege is not available on the "lesser" Windows licenses.

I cannot say why EMSRV needs the privilege nor can I say why Microsoft does the things it does. :-)

I believe I ran EMSRV with logging enabled and the log seemed to support the privilege story. I can understand it exiting if it cannot get (what it thinks is) the necessary privilege.


Perhaps John can shed some more light on this requirement and whether it really is still required for recent versions of Windows.

Louis LaBrunda

unread,
Sep 2, 2014, 2:49:22 PM9/2/14
to va-sma...@googlegroups.com
Hi Richard,

Thanks for the info.  As I said, I am now able to install the service (too many typos in too long a command line in the command window gave me trouble).  It starts, then stops with Event 4101 "Failed checking command line arguments".  I hope this has nothing to do with a necessary privilege and is something to do with running a 32 bit program in the 64 bit environment.  I'm going to email Instantiations and see what they come up with.  Thanks again. 

Lou

Louis LaBrunda

unread,
Sep 4, 2014, 9:46:57 AM9/4/14
to va-sma...@googlegroups.com
Hi Richard,

I have solved my problem(s) running EMSRV as a service on Windows 8.1 "Home" edition.  My troubles boiled down to a little dyslexia, some bad typing and the rather long and involved command line needed to get the service installed.  After that worked I still had a problem with the EMSRVUSER not having privileges to access the manager file.  Once I allowed that, all was good.

Lou

Richard Sargent

unread,
Sep 4, 2014, 11:46:00 AM9/4/14
to VA Smalltalk

Great news!
Can you share the precise details to set this up?

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/Zm6Zvawq6Fg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to va-smalltalk...@googlegroups.com.
To post to this group, send email to va-sma...@googlegroups.com.
Visit this group at http://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.

Louis LaBrunda

unread,
Sep 4, 2014, 4:38:47 PM9/4/14
to va-sma...@googlegroups.com
Hi Richard,

I'm happy to share.  I attached the same info in a file I wrote so I don't forget how to do it:

How to install EMSRV as an NT service (note, paths and file names are for VA Smalltalk v8.6


Create EMSRVUSER (Find the place in Windows to create new users

Account type of "Standard" is fine

Remember the password


In a command window run as administrator (this is important).

Change the directory to where emsrv.exe lives, probably something like this:

cd Program Files (x86)\Instantiations\VA Smalltalk\8.6

Then run the emsrv.exe program to install the service, being sure to use the triple double quotes
and the password from the above user setup:

emsrv -install -mp -u EMSRVUSER -p ThePasswordFromAbove -W """c:\Program Files (x86)\Instantiations\VA Smalltalk\8.6"""

At this point the service should be installed.  If you want it to start automatically you need
to find it in the Services window and change the setting.


Now in a file browser, find the manager file, it should be here
(depending upon your VA Smalltalk version and its name,
note: ProgramData is usually a hidden folder:

c:\ProgramData\Instantiations\VA Smalltalk\8.6\manager\mgr86.dat

Change its Properties>Security to include the ERSRVUSER with "Full control".

That should be it.  I haven't done this and so far I haven't found a reason to but
there may be some value in setting up emsrv.exe to run as Administrator.



Lou
EMSRV-Install.Txt

Richard Sargent

unread,
Sep 4, 2014, 5:02:09 PM9/4/14
to VA Smalltalk
Thanks, Lou!
I think it may be the "triple double quotes" that caused my problems. I'll have to look into that tonight when I am home.

Louis LaBrunda

unread,
Sep 5, 2014, 4:37:51 PM9/5/14
to va-sma...@googlegroups.com
Hey Richard,

How did it go?

I can't seem to get the service to autostart.  I define it as such but nothing happens.  If I start it by hand, all is well.  I'm going to try putting a command file with "sc start emsrv" in a start up folder and see how that goes.

As for the "triple double quotes", I'm going to stick my nose out a little here and do something I'm a little loath to do and that is criticize another programmer especially when he/she isn't around to defend them selves.  I don't know what's up with the "triple double quotes"???  I can see one set, without one set windows treats the things between blanks as separate parameters so one set is needed to keep the path together.  But why three?  My guess is that the path is passed on to other things that also need the double quotes.  I would prefer it if the programmer added the double quotes back when needed instead of us users having to wrap the path in triple double quotes.

Anyway, we are big boys and supplying "triple double quotes" is no big deal but we do this so seldom and it is so easy to mess up that it is annoying.

Lou

Richard Sargent

unread,
Sep 5, 2014, 4:54:49 PM9/5/14
to va-sma...@googlegroups.com
On Friday, September 5, 2014 1:37:51 PM UTC-7, Louis LaBrunda wrote:
How did it go?

Sad to say, I had other things come up last night. I'll definitely try it this weekend (perhaps this evening!).
 

I can't seem to get the service to autostart.  I define it as such but nothing happens.  If I start it by hand, all is well.  I'm going to try putting a command file with "sc start emsrv" in a start up folder and see how that goes.

No idea about that. The command file sounds like a good approach. (In general, I don't leave ENVY running if I'm not actively working with VA. So I typically have a start and stop shortcut that I use. But it's much the same idea.)


As for the "triple double quotes", I'm going to stick my nose out a little here and do something I'm a little loath to do and that is criticize another programmer especially when he/she isn't around to defend them selves.  I don't know what's up with the "triple double quotes"???  I can see one set, without one set windows treats the things between blanks as separate parameters so one set is needed to keep the path together.  But why three?  My guess is that the path is passed on to other things that also need the double quotes.  I would prefer it if the programmer added the double quotes back when needed instead of us users having to wrap the path in triple double quotes.

Anyway, we are big boys and supplying "triple double quotes" is no big deal but we do this so seldom and it is so easy to mess up that it is annoying.

I think there is a Windows-ish explanation for them. The installed service needs the command line argument quoted so it is treated as a single word. And the command to install the service needs to protect those quotes, so it needs to escape them, which is done by doubling them inside the outermost quotes. I don't claim it makes sense, but I think that's what it is all about.

Richard Sargent

unread,
Sep 6, 2014, 3:02:29 AM9/6/14
to va-sma...@googlegroups.com
On Friday, September 5, 2014 1:54:49 PM UTC-7, Richard Sargent wrote:
On Friday, September 5, 2014 1:37:51 PM UTC-7, Louis LaBrunda wrote:
How did it go?
 
I tried it out and your instructions worked. I have EMSRV running.

FYI, you can find the service definition in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EMSRV. If you exit the registry (with caution!), you can add a description to the Services display. e.g. add a new string value with the name "Description" and for my example with the value "ENVY Manager Service"

I have not done the shortcuts for starting and stopping the service.

Louis LaBrunda

unread,
Sep 8, 2014, 11:44:47 AM9/8/14
to va-sma...@googlegroups.com
Hi Richard,


On Saturday, September 6, 2014 3:02:29 AM UTC-4, Richard Sargent wrote:
On Friday, September 5, 2014 1:54:49 PM UTC-7, Richard Sargent wrote:
On Friday, September 5, 2014 1:37:51 PM UTC-7, Louis LaBrunda wrote:
How did it go?
 
I tried it out and your instructions worked. I have EMSRV running.

Great!
 
FYI, you can find the service definition in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EMSRV. If you exit the registry (with caution!), you can add a description to the Services display. e.g. add a new string value with the name "Description" and for my example with the value "ENVY Manager Service"

Thanks. I did "exit the registry (with caution!)" (I'm sure meant "Edit"), I like having the description set.
 
I have not done the shortcuts for starting and stopping the service.

I don't know why it won't auto start, it worked in windows 7, it must be a windows 8 security thing.  Anyway my little command file that uses the "sc" command in a start up folder works fine.

Lou
 

Richard Sargent

unread,
Sep 8, 2014, 11:54:16 AM9/8/14
to va-sma...@googlegroups.com
On Monday, September 8, 2014 8:44:47 AM UTC-7, Louis LaBrunda wrote:
FYI, you can find the service definition in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EMSRV. If you exit the registry (with caution!), you can add a description to the Services display. e.g. add a new string value with the name "Description" and for my example with the value "ENVY Manager Service"

Thanks. I did "exit the registry (with caution!)" (I'm sure meant "Edit"), I like having the description set.

Indeed I did. I can spell much better than I can type. :-)

 
 
I have not done the shortcuts for starting and stopping the service.

I don't know why it won't auto start, it worked in windows 7, it must be a windows 8 security thing.  Anyway my little command file that uses the "sc" command in a start up folder works fine.

I suspect it is a permissions issue. I noticed the "sc" command requires administrator privilege to run. So it *might* be the case that the EMSRVUSER doesn't have the necessary permissions to start the service. I really don't know much about how Windows manages services. But this might be what the "act as part of the operating system" privilege is all about.

It's not a big deal to have shortcuts for starting and stopping the service and having to give permission for them to execute.

Louis LaBrunda

unread,
Sep 8, 2014, 12:10:15 PM9/8/14
to va-sma...@googlegroups.com
Hey,


On Monday, September 8, 2014 11:54:16 AM UTC-4, Richard Sargent wrote:
On Monday, September 8, 2014 8:44:47 AM UTC-7, Louis LaBrunda wrote:
FYI, you can find the service definition in the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EMSRV. If you exit the registry (with caution!), you can add a description to the Services display. e.g. add a new string value with the name "Description" and for my example with the value "ENVY Manager Service"

Thanks. I did "exit the registry (with caution!)" (I'm sure meant "Edit"), I like having the description set.

Indeed I did. I can spell much better than I can type. :-)

I can type much better than I can spell but that is not saying much.
  
 
I have not done the shortcuts for starting and stopping the service.

I don't know why it won't auto start, it worked in windows 7, it must be a windows 8 security thing.  Anyway my little command file that uses the "sc" command in a start up folder works fine.

I suspect it is a permissions issue. I noticed the "sc" command requires administrator privilege to run. So it *might* be the case that the EMSRVUSER doesn't have the necessary permissions to start the service. I really don't know much about how Windows manages services. But this might be what the "act as part of the operating system" privilege is all about.

It's not a big deal to have shortcuts for starting and stopping the service and having to give permission for them to execute.

Yea, I agree.  I have a few other things I like to run at start up that need administrator privileges.  I had a free program on windows 7 called "Startup Unblocker" that would setup (not sure how) programs that required administrator privileges to run at start up and not prompt for permission.  It worked well on windows 7, it doesn't seem to work on windows 8.

Lou


Richard Sargent

unread,
Mar 12, 2015, 3:10:01 PM3/12/15
to va-sma...@googlegroups.com

I think I know what the problem might have been. I just went through this exercise on my work computer and EMSRV would stop as soon as it started.

I editted the service properties and explicitly set the Log On account information. When I hit OK, a pop up told me the account had been changed to allow it to log on as a service. And now, it stays running when I start it.
 

Lou


Louis LaBrunda

unread,
Mar 12, 2015, 4:41:23 PM3/12/15
to va-sma...@googlegroups.com
Hi Richard,

I start it as an NT service from a command file with:

sc start EMSRV

and it runs fine all day.  But I have it setup to start automatically (see the attached snap shots) but it doesn't start.  If I stop it and then start it from the services window it seems to be fine.

I can't remember if I can start it manually from the services window but I think I can.  It just doesn't seem to want to start automatically.

Do you log on to a local system account or a user account?

Lou
EmsrvGeneral.jpg
EmsrvLogOn.jpg

Richard Sargent

unread,
Mar 12, 2015, 5:38:01 PM3/12/15
to va-sma...@googlegroups.com

I changed from using the LocalService account to using the ENVY Manager user account specified by the -u and -p command line parameters.

 

Lou
Reply all
Reply to author
Forward
0 new messages