LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Application as a Startup Windows application : error!

Following knowledgebase "Configure a LabWindows/CVI Installer to Run as a Startup Windows Application" I tried with a distribution kit to turn my application into a startup windows application.

I used a registry key created in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run

 

Installation of my application seems OK with the distribution.

When starting my computer, my application.exe is automatically launched but unable to find it's 'config.ini' file located in the same directory.

When I manually launch my application.exe everything is OK and 'config.ini' found by my application.

 

Any ideas?

 

Thanks.

Cyrille

0 Kudos
Message 1 of 7
(3,354 Views)

Solved.

 

The fonction Ini_ReadFromFile doesn't work with relative path in an application started automatically by windows startup!!

 

Cyrille

0 Kudos
Message 2 of 7
(3,332 Views)

Hi Cyrille,

 

I'll look into this during the day. Did you try with a simple txt file (OpenFile or fopen functions) ?

 

Regards,

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 3 of 7
(3,328 Views)

No I didn't. If I've got time I'll try.

 

What's strange if I ask the project folder with GetProjectDir, my app detects the right folder (even automatically launched by windows startup). It seems ini function doesn't know where it is a startup. I should try the ini_WriteToFile with a relative, just to see what happens!

 

Thanks anyway to have a look at this behaviour.

Cyrille.

 

 

0 Kudos
Message 4 of 7
(3,321 Views)

I tried with ini_WriteToFile() and the relative path.

With my app manually launched it creates well the file in the same directory.

With my app automatically launched by Windows it creates the file in the 'C:\users\Admin\AppData\Local\VirtualStore\Windows' folder.

 

Cyrille

0 Kudos
Message 5 of 7
(3,314 Views)

After a couple research, this can happen when the program executing does not have full admin rights to read/write to the Program Files folder. It's also true when the program responds to a specific UAC. Windows then stores data in the Virtual Store to prevent all the users of the comp from having a modified Program Files folder. It's possible that the simple fact of turning an application into startup may disable the admin rights of the program. If so, this article might help !

 

Regards,

Eric M. - Senior Software Engineer
Certified LabVIEW Architect - Certified LabVIEW Embedded Systems Developer - Certified LabWindows™/CVI Developer
Neosoft Technologies inc.

0 Kudos
Message 6 of 7
(3,302 Views)

Thanks Eric.

Just to remind the ini functions correctly work when used with absolute pathnames, having full access to the program files folder (as specified with 'Make writable for all users' in the distribution kit).

I was wondering if the ini library is correcrtly loaded from startup application (just seems lost).

 

Thanks again.

Regards.

Cyrille

0 Kudos
Message 7 of 7
(3,295 Views)