I have been trying to get my Alchemy code to run in Vista and have been bumping into an issue. The architecture consists of a service (I created) that spawns off to a command line program, AlchemyCmd.exe, that talks to Alchemy through interop (Interop.Alchemy.dll). The problem occurs when the LoadOptionsFile function is called, it throws and error with the message “No valid license”. This code works just fine in XP. Do you have any idea why this is occurring?
I can call AlhemyCmd.exe from a Vista command prompt and it works properly. It fails when the service tries to spawn to it. The service is running under a user that has rights to execute Alchemy.
Thanks.
AlchemyCmd.exe C# Code (partial)
static Alchemy.ApplicationClass app = new Alchemy.ApplicationClass();
try
{
Log("Loading options file.");
app.LoadOptionsFile(""); // failing here
Log("Loaded options file.");
// more code
//…
}
catch (Exception ex)
{
Log(ex.Message + "\nStack Trace:\n" + ex.StackTrace);
Console.WriteLine("AlchemyCmd - " + ex.Message);
}
Log file
5/1/2008 11:32:04 AM [Info] - Start logging.
5/1/2008 11:32:04 AM [Info] - RefID: 1b17a27c-eab2-422d-b50e-e10786260c4d
Loading options file.
5/1/2008 11:32:04 AM [Info] - RefID: 1b17a27c-eab2-422d-b50e-e10786260c4d
No valid license
Stack Trace:
at Alchemy.ApplicationClass.LoadOptionsFile(String Path)
at AlchemyCmd.Program.Main(String[] args)