user.home error

Asked by jeffrey

Hi,

Firstly, thank you for this usefull project !

I've created scenario with IDE, it works fine.
Now, i would like start it automatically after user logged in (i'm already to do it with a simple swing application, works fine).

But when the service start sikuli from command line, error appears immediately:

[ERROR] RunIDE: JavaSystemProperty::user.home not valid: C:\Users\jeffrey

I don't understand, this directory exists, it's my current user's home directory

I don't want to use startup menu because i want to hide (via a wrapper) the back and white msdos console while running.

It works fine from an other VM, both VMs are up to date
sikulix.jar 1.1.4
Windows 7 pro SP1
JDK 11.0.2

Perhaps i've forgotten something, any idea?

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
jeffrey
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#2

Depending on how you run this "service" it might not be accessible (access rights ?)

Revision history for this message
jeffrey (jeffrey4000) said :
#3

At the boot of OS, this service (C# coded) start (so is started before the login screen), it's waiting for a user open his session, and when it (the service) discover a logon session, it takes the session token of the user and start the .bat file which contains the java command to start sikuli.

This trick works fine with my "myswing.jar" (in the same folder as sikulix.jar, it's just a JFrame in a main()), so the java process is runned by the current user, like if it was really him that make action (scenario).

I thought about a context (varenv, java vars, i'm not very familiar with windows) problem.

Revision history for this message
RaiMan (raimund-hocke) said :
#4

sorry, but too special - so I cannot help you.

apparently SikuliX does not behave as you expect in this situation.

Revision history for this message
jeffrey (jeffrey4000) said :
#5

I've found what was the problem, we had right together!

Despite the impersonnation to current user seems working fine (a "whoami" command to verify output before launch java), i've compared varenv (with "set" just after "whoami") and it was not same values!

So the execution of sikuli tried to work with "c:\windows\system32\config\systemprofile\", but current user was unable to create files/folders directly in, cause of UAC.

Solution:

Just navigate in this directory at once a accept UAC validation.
Restart the service, it works!

Thanks.