Foren


Comfort Software :: Foren :: Development
<< Vorheriger Thread | Nächster Thread >>   

Programmatically start CKeyboard.exe

Autor Eintrag
Michael Night
Mon Oct 10 2011, 10:29AM
Registriertes Mitglied #882
Dabei seit: Mon Oct 10 2011, 10:09AM
Einträge: 2
Hello,
i'm testing Comfort On-Screen Keyboard for my company, if the software conforms our requirements. The software should be copied programmatically (Java) to every machine (win xp, win 7) without setup. This works so far. The second step is starting CKeyboard.exe programmatically, but it crashes on my Win7 machine: "The requested operation requires elevation" (but the files are saved on d:)
Is the reason, that i'm testing the trialversion?


ProcessBuilder processBuilder = new ProcessBuilder(new String[] { COMFORTKEYBOARD });
processBuilder.directory(new File(COMFORTKEYBOARD_FOLDER));
Process actualProcess = processBuilder.start();
Nach oben
Comfort
Mon Oct 10 2011, 10:51AM


Dabei seit: Wed Sep 19 2007, 03:42PM
Einträge: 545
No, this is not depends on the trialversion.
If you use Windows Vista or Windows 7, the program must be installed in the Program Files folder. It's a security-related requirement for these operating systems.

Or try to launch the program with other method.

Have a nice day
Nach oben
Michael Night
Fri Oct 21 2011, 04:42AM
Registriertes Mitglied #882
Dabei seit: Mon Oct 10 2011, 10:09AM
Einträge: 2
I have installed on Program Files, but it still doesn't work (even as administrator).
Nach oben
Comfort
Fri Oct 21 2011, 05:20AM


Dabei seit: Wed Sep 19 2007, 03:42PM
Einträge: 545
Maybe it's better to try something simple:

Runtime.getRuntime().exec("\"C:/Program Files/ComfortKeyboard/CKeyboard.exe\"");


Have a nice day
Nach oben
Menico
Thu Jan 12 2012, 04:54AM
Registriertes Mitglied #928
Dabei seit: Thu Jan 12 2012, 04:47AM
Einträge: 1
Hi,

the problem is the very restrictive way UAC acts like under Win7. The JVM always runs in a non elevated way and cannot execute priviledged actions.

I've tried several methods to start the exe...
1. Runtime.getRuntime().exec(...);
2. ProcessBuilder
3. External "elevators" like PSExec.
4. With a manifest.mf file
5. Wrapperclass to run the jar-File priviledged.

Nothing worked.

But finally I've found a very convenient and easy way to start CKeyboard.exe with UAC activated (givven that the logged on windowsuser has read rigths on Ckeyboard.exe).

@Comfort
If you're interested in getting the sourcecode for the solution, please contact me via e-Mail or PM.

@Michael Nigth
If you are who I think you are, you already got my solution

[ Bearbeitet Thu Jan 12 2012, 04:58AM ]
Nach oben
Moderatoren: Comfort

Forum:     Nach oben

Syndicate diesen thread: rss 0.92 Syndicate diesen thread: rss 2.0 Syndicate diesen thread: RDF
Powered by e107 Forum System