简体   繁体   中英

Open ACCESS Application thru C# Application on windows 7

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

I could be wrong on this, but my guess is that it's running in reduced functionality mode due to your not defining a trusted location from which it can run. I don't know how this is done in code, but if you launch A2007, it's on the Office menu under Access Options (I'm posting from menu, as I mostly use A2003 and don't want to wait through the re-registration process).

We uninstall current OFFICE SBE 2007 and Install a newest version of OFFICE SBE 2007. everything works fine now.
our conclusion is that Office SBE 2007 first version (instaled at client computer) doesn't work well with Access Runtime 2007.

(weird, but work)


David, Thank You very much.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM