View Full Version : DMC running as Windows 2000 Server service
kdichter
10-31-2005, 07:03 PM
I have a program written in C++ calling DMC (ver 10.1) for conversions from MP3 to Wav. That program runs on a timer. It has been working fine for years.
Now that we have server class computers running Windows 2000 server, we are trying to run all applications as a service and leave the desktop user logged out.
The program sets parameters to 22050, 16 bit, mono. When I run the application on the desktop, the output is perfect!! When I start the application as a Windows service, it runs as a service, but all my audio turns to 44100, 16 bit, stereo?? Same program, the only difference is if I start it as a service vs an app on the desktop.
To make things more confusing, I wrote a small VBS that can perform the same conversions. Unfortunately, that also works fine if I double click it but gives a stereo output when run as a service or called by another program that is running as a service.
I'm stumped?? Can someone suggest anything to try?? I can forward the VBS code or C++ executable if anyone were willing to try it and help me.
Thanks
Ken
ChristinaS
10-31-2005, 07:19 PM
I think it's because it is running under "all users" and there is no last setting for dMC selections to fall back on other than the default setting.
When you sign in you go under some admin user probably.
Try to run it manually once as a guest user if it's possible. I'm not sure, since I'm always running doing everything as admin. But if that works, then chances are the necessary settings will get saved.
It might be more complex though. You may need to copy some settings to an area where the process runs when it runs unattended like that. No idea of where this might be.
kdichter
10-31-2005, 10:41 PM
Thanks for trying to help me!! My login is as an administrator, but when running as a service the program runs as "Local System Account". I did make sure that the Illustrate folder is available to "all users". I tried logging on as the generic user account and modified the defaults there. It did not seem to help.
Is there somewhere I can look in the files or registry to verify or modify the settings?? I am puzzled because I do set wav parameters every time I go to call a conversion.
I appreciate your help or suggestions.
Thanks
LtData
10-31-2005, 11:22 PM
The encoding registry settings are a per-user setting, unfortunately. I'm not sure there is a way to change the registry for "Local System Account" unless there is some way to modify the registry for this account.
ChristinaS
11-01-2005, 12:38 AM
Would thsi help?
Changes that you make to environment variables do not affect services that run under the Local System account until you restart Windows 2000
View products that this article applies to.
Article ID : 821761
Last Review : March 17, 2004
Revision : 1.0
SYMPTOMS
If you update environment variables or add new environment variables, you must restart your Microsoft Windows 2000 Server-based computer before the changes that you make affect services that run under the Local System account.
CAUSE
This behavior occurs because services that run under the Local System account inherit their environment from the Services.exe process. The Services.exe process receives the environment settings for the Local System account when Windows 2000 starts. Because the Services.exe process does not use Windows Messaging, when it receives messages that indicate that a value has changed after Windows 2000 starts, the Services.exe process does not update its environment settings. You cannot force a service that is running to acknowledge a dynamic change to the environment of the Local System account.
MORE INFORMATION
For additional information about environment variables, click the following article number to view the article in the Microsoft Knowledge Base:
311843 (http://support.microsoft.com/kb/311843/) HOW TO: Create System Variables in Windows 2000
--------------------------------------------------------------------------------
APPLIES TO
• Microsoft Windows 2000 Server
• Microsoft Windows 2000 Professional Edition
• Microsoft Windows 2000 Advanced Server
LtData
11-01-2005, 08:32 AM
Moved to dMC Support.
kdichter
11-02-2005, 01:32 PM
Problem WAS related to using the "Local System Account". I changed the service to run as an actual user with a user name and password and it resolved my problem.
Thanks to all those who helped.
Ken
ChristinaS
11-02-2005, 03:13 PM
LOL! Great! :thumbup:
kdichter
11-02-2005, 04:45 PM
OK, I don't know if this should remain in the same thread. On more testing, I found that my problem is only partially fixed. You were correct about the defaults. The program did seem to work correctly when I set the defaults. My question, Why is it that when my program changes these settings they do not seem to take?? Is my code wrong??
In VBScript it's:
' Create dMC Object
Set dMC = CreateObject("dMCScripting.Converter")
Set WaveSettings = CreateObject("dMCScripting.WaveSettings")
' Set My options (Volume norm OFF, ID Tag Preservation ON, Delete Source Files ON)
dMC.VolumeNormalize = False
dMC.PreserveTags = True
dMC.DeleteSourceFiles = True
' Set WaveForm Parameters for MetroSource (22050, 16 Bit, Mono)
Call WaveSettings.Set(22050, 1, 16)
' Set Output Folder (to C:\Conversion123 )
dMC.ConvertToFolder = True
dMC.ToFolder = TargetPath
' Convert To Wave (No option page, Want Overwrite page, Want finished, Want Errors)
Call dMC.GoConversion("Wave", true, true, true, true)
Spoon
11-03-2005, 02:34 PM
The user account it is running under requires access to the registry, try it as an administrator account to begin with.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.