From: teldan on 3 Mar 2010 00:56 Hi all, Some background: we have a windows application (c#) that locate in the system try. that simple application is a basically shortcuts manger for other application and messaging between the workers. one of the application is an Access 2007 application (connected to sqlserver) - the client works with ACCESS Runtime 2007 (latest version) THE problem is that we can not launch the Access application correctly from the C# application. THE problem is only on windows 7 (we don't have vista) - [on XP OS everything works fine) "correctly" - meaning that the Access application running but the Ribbon Bar is missing some Icons (strange). also some functionality like open the Outlook is not working. Some more Info: - IF we put shortcut on the client desktop to the Access application everything ok. - The C# application have no problem to launch other EXE file. - The C# application include Manifest file (run as admin on Win 7). -------------------------------------------------------------------------------- //The Original code is very simple (Works only in XP): System.Diagnostics.Process.Start(AppPath); //The 'Open EXE' code that works (Works on XP and Win7)-[not working with Access Application] : Process Proc= new Process(); Proc.StartInfo.UseShellExecute = false; Proc.StartInfo.FileName = Application.StartupPath + @"\PasswordManager.exe"; Proc.Start(); //We try many codes with no success like [NOT WORKING]: System.Diagnostics.Process proc = new System.Diagnostics.Process(); proc.EnableRaisingEvents = false; proc.StartInfo.FileName = sAccPath;// msaccess Path; proc.StartInfo.Arguments = @"""" + AppPath+ @""""; proc.Start(); //We also try to add [NOT WORKING]: System.OperatingSystem osInfo = System.Environment.OSVersion; if (osInfo.Version.Major > 5) proc.StartInfo.Verb = "runas"; Helppppppppppp!!! Thanks
From: James A. Fortune on 3 Mar 2010 10:47 On Mar 3, 12:56 am, teldan <telda...(a)gmail.com> wrote: > Hi all, > > Some background: > we have a windows application (c#) that locate in the system try. > that simple application is a basically shortcuts manger for other > application and messaging between the workers. > > one of the application is an Access 2007 application (connected to > sqlserver) - the client works with ACCESS Runtime 2007 (latest > version) > > THE problem is that we can not launch the Access application correctly > from the C# application. > THE problem is only on windows 7 (we don't have vista) - [on XP OS > everything works fine) > > "correctly" - meaning that the Access application running but the > Ribbon Bar is missing some Icons (strange). also some functionality > like open the Outlook is not working. > > Some more Info: > - IF we put shortcut on the client desktop to the Access application > everything ok. > - The C# application have no problem to launch other EXE file. > - The C# application include Manifest file (run as admin on Win 7). > > -------------------------------------------------------------------------------- > //The Original code is very simple (Works only in XP): > System.Diagnostics.Process.Start(AppPath); > > //The 'Open EXE' code that works (Works on XP and Win7)-[not working > with Access Application] : > Process Proc= new Process(); > Proc.StartInfo.UseShellExecute = false; > Proc.StartInfo.FileName = Application.StartupPath + > @"\PasswordManager.exe"; > Proc.Start(); > > //We try many codes with no success like [NOT WORKING]: > System.Diagnostics.Process proc = new System.Diagnostics.Process(); > proc.EnableRaisingEvents = false; > proc.StartInfo.FileName = sAccPath;// msaccess Path; > proc.StartInfo.Arguments = @"""" + AppPath+ @""""; > proc.Start(); > > //We also try to add [NOT WORKING]: > System.OperatingSystem osInfo = System.Environment.OSVersion; > if (osInfo.Version.Major > 5) > proc.StartInfo.Verb = "runas"; > > Helppppppppppp!!! > Thanks If all else fails, I saw the following in the microsoft.public.dotnet.languages.csharp newsgroup: Access.Application oAccess = null; // Start a new instance of Access for Automation: oAccess = new Access.ApplicationClass(); // Open a database in exclusive mode: oAccess.OpenCurrentDatabase( "c:\\mydb.mdb", //filepath true //Exclusive ); I don't have Access on my Windows 7 Enterprise Trial Version so I can't test to see if it will work with Access on Windows 7. James A. Fortune MPAPoster(a)FortuneJames.com
|
Pages: 1 Prev: Method for Requery/Resort while adding new records Next: Auto restart possible ?? |