• fmr
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Dear SalesForce Community,

as I just set up Email to Case as a Windows 2003 Server system service for the company I am working for, I would like to tell you how I did it. The instructions in this Discussion Boards are not as clear and rather misleading.

I assume Email to Case is already working by simply running the batch file.

1. Get the Windows Server 2003 Resource Kit Tools from:
    http://www.microsoft.com/downloads/details.aspx?familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
2. Install them and type in the following on the command line:
    C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" YourServiceName "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
    (This assumes you installed the tools to "C:\Program Files\Windows Resource Kits\Tools\". If you specified another path, use this one instead.
    Also you should replace "YourServiceName" by something like "SalesForceEmailAgent" as I named it.)
3. Open up the registry editor by running "regedit.exe"
4. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourServiceName\
5. Create a new key below "YourServiceName" and name it "Parameters" (just like "Security" is a key below "YourServiceName")
6. Create a new String Value (REG_SZ) called "Application" and set the value to "C:\EmailAgent\email2case.bat" (or where ever your email2case.bat can be found)
7. Edit your email2case.bat and change it to:
   
    echo Email To Case Agent v1.07
    java -jar -Xmx256M C:\EmailAgent\Email2Case.jar C:\EmailAgent\sfdcConfig.txt C:\EmailAgent\log4j.properties

    (update the path to where you put your files)

8. Go to Control Panel -> Administrative Tools -> Services (or run "services.msc") and search for your entry ("YourServiceName")
9. Hit properties and make sure that its "Startup Type" is set to "Automatic"
10. Go to the "Log On" tab and make sure "Log on as:" is set to "Local System Account"
11. If you would start the service right now, it would run, but not write a log file. In order to get logging working, you need to edit your log4j.properties
    (can be found in the EmailAgent folder) and change the following two values:

    log4j.appender.LOGFILE.File=C:/EmailAgent/EmailAgent.log

    log4j.appender.PERFFILE.File=C:/EmailAgent/wsc.log

    (or where ever your folder is located)

12. Just start the service and everything should work fine!

I hope this could solve the mystery of Windows Server 2003 services for the most of you. Feel free to comment on my solution.


Message Edited by fmr on 07-21-2008 08:27 AM
  • July 18, 2008
  • Like
  • 0
Dear SalesForce Community,

as I just set up Email to Case as a Windows 2003 Server system service for the company I am working for, I would like to tell you how I did it. The instructions in this Discussion Boards are not as clear and rather misleading.

I assume Email to Case is already working by simply running the batch file.

1. Get the Windows Server 2003 Resource Kit Tools from:
    http://www.microsoft.com/downloads/details.aspx?familyid=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en
2. Install them and type in the following on the command line:
    C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" YourServiceName "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
    (This assumes you installed the tools to "C:\Program Files\Windows Resource Kits\Tools\". If you specified another path, use this one instead.
    Also you should replace "YourServiceName" by something like "SalesForceEmailAgent" as I named it.)
3. Open up the registry editor by running "regedit.exe"
4. Go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\YourServiceName\
5. Create a new key below "YourServiceName" and name it "Parameters" (just like "Security" is a key below "YourServiceName")
6. Create a new String Value (REG_SZ) called "Application" and set the value to "C:\EmailAgent\email2case.bat" (or where ever your email2case.bat can be found)
7. Edit your email2case.bat and change it to:
   
    echo Email To Case Agent v1.07
    java -jar -Xmx256M C:\EmailAgent\Email2Case.jar C:\EmailAgent\sfdcConfig.txt C:\EmailAgent\log4j.properties

    (update the path to where you put your files)

8. Go to Control Panel -> Administrative Tools -> Services (or run "services.msc") and search for your entry ("YourServiceName")
9. Hit properties and make sure that its "Startup Type" is set to "Automatic"
10. Go to the "Log On" tab and make sure "Log on as:" is set to "Local System Account"
11. If you would start the service right now, it would run, but not write a log file. In order to get logging working, you need to edit your log4j.properties
    (can be found in the EmailAgent folder) and change the following two values:

    log4j.appender.LOGFILE.File=C:/EmailAgent/EmailAgent.log

    log4j.appender.PERFFILE.File=C:/EmailAgent/wsc.log

    (or where ever your folder is located)

12. Just start the service and everything should work fine!

I hope this could solve the mystery of Windows Server 2003 services for the most of you. Feel free to comment on my solution.


Message Edited by fmr on 07-21-2008 08:27 AM
  • July 18, 2008
  • Like
  • 0