Forums


Comfort Software :: Forums :: Development
<< Previous thread | Next thread >>   

Programmatically start CKeyboard.exe

Author Post
Michael Night
Mon Oct 10 2011, 10:29am
Registered Member #882
Joined: Mon Oct 10 2011, 10:09am
Posts: 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();
Back to top
Comfort
Mon Oct 10 2011, 10:51am


Joined: Wed Sep 19 2007, 03:42pm
Posts: 525
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
Back to top
Michael Night
Fri Oct 21 2011, 04:42am
Registered Member #882
Joined: Mon Oct 10 2011, 10:09am
Posts: 2
I have installed on Program Files, but it still doesn't work (even as administrator).
Back to top
Comfort
Fri Oct 21 2011, 05:20am


Joined: Wed Sep 19 2007, 03:42pm
Posts: 525
Maybe it's better to try something simple:

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


Have a nice day
Back to top
Menico
Thu Jan 12 2012, 04:54am
Registered Member #928
Joined: Thu Jan 12 2012, 04:47am
Posts: 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

[ Edited Thu Jan 12 2012, 04:58am ]
Back to top
Moderators: Comfort

Jump:     Back to top

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