Highlighted

Autostart App is not work with capative runtime

Community Beginner ,
Jul 09, 2015

Copy link to clipboard

Copied

Hello

My name is Jaikishan Patel, right now i am developing desktop application which need to autostart, so i

if (NativeApplication.supportsStartAtLogin)
{
  NativeApplication.nativeApplication.startAtLogin = true;
}

When i build a release with .AIR and .EXE extension i have no issue with autostart. but when i build release with Captive runtime at that time, autostart doesn't work at all so i need any possible solution for that, please let me know if you have any possible solution for this issue

i goggled for this issue and i found only Question with answer from stackoverflow.

Thanks

JK Patel

TOPICS
Development

Views

513

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Autostart App is not work with capative runtime

Community Beginner ,
Jul 09, 2015

Copy link to clipboard

Copied

Hello

My name is Jaikishan Patel, right now i am developing desktop application which need to autostart, so i

if (NativeApplication.supportsStartAtLogin)
{
  NativeApplication.nativeApplication.startAtLogin = true;
}

When i build a release with .AIR and .EXE extension i have no issue with autostart. but when i build release with Captive runtime at that time, autostart doesn't work at all so i need any possible solution for that, please let me know if you have any possible solution for this issue

i goggled for this issue and i found only Question with answer from stackoverflow.

Thanks

JK Patel

TOPICS
Development

Views

514

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 09, 2015 0
Engaged ,
Jul 09, 2015

Copy link to clipboard

Copied

What version of Windows are you testing on and what version of AIR are you using?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 09, 2015 0
Engaged ,
Jul 09, 2015

Copy link to clipboard

Copied

What is the value of NativeApplication.supportsStartAtLogin when running the app with a captive runtime?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 09, 2015 0
Community Beginner ,
Jul 09, 2015

Copy link to clipboard

Copied

when I test app in release mode. i get #2014

when i test app in Debug mode, i get #2014: Feature is not available at this time.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 09, 2015 0
Community Beginner ,
Jul 09, 2015

Copy link to clipboard

Copied


Adobe Air SDK Version: 18.0.0.180

Windows : Windows 7 Ultimate

App developed using Flash builder

i do not mind to use any version of Adobe air, just i need auto start functionality works correct.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 09, 2015 0
Community Beginner ,
Jul 09, 2015

Copy link to clipboard

Copied

I had tested this app in Windows7 Ultimate with 64bit and Windows 8 with 32bit both gives me #2041 in release mode and #2041: Feature is not available at this time.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 09, 2015 0
Engaged ,
Jul 10, 2015

Copy link to clipboard

Copied

Are these personal computers you are testing with or company issued computers that are locked down and have next to no admin rights?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2015 0
Community Beginner ,
Jul 10, 2015

Copy link to clipboard

Copied

I have my personal computer and laptop on which i had test it.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2015 0
Engaged ,
Jul 10, 2015

Copy link to clipboard

Copied

maybe the app needs to run in admin mode in order to be able to set start at login?  I'm grasping at straws here, I'm sorry I can't be of more help.

If you have the call to startAtLogin wrapped in if (NativeApplication.supportsStartAtLogin) like you have above, that shouldn't throw an error though, right? It should detect that the feature isn't available and not throw an error.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2015 0
Engaged ,
Jul 10, 2015

Copy link to clipboard

Copied

My concern in asking about personal vs work computers was, as kawikaheftel mentioned, admin rights. For Windows 8, have you tried producing a ".app" file instead of an ".exe"? Possibly a stupid second question, but is your app located in the "Program Files (x86)" folder? Wonder if it doesn't like trying to have an app be able to launch at startup because it isnt in the Program Files folder.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2015 0
Community Beginner ,
Jul 10, 2015

Copy link to clipboard

Copied

I have added a sample code and its result in attachment, today i test demo with SDK version 3.1 but still issue remains same, so i think there is error in Window, how can i know that ?

startAtLogin.jpg

<?xml version="1.0" encoding="utf-8"?>

<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"

                       xmlns:s="library://ns.adobe.com/flex/spark"

                       xmlns:mx="library://ns.adobe.com/flex/mx">

    <fx:Script>

        <![CDATA[

            import mx.controls.Alert;

            protected function btnSetAutoStart_clickHandler(event:MouseEvent):void

            {

                if(NativeApplication.supportsStartAtLogin)

                {

                    try

                    {

                        nativeApplication.startAtLogin = true;

                    }

                    catch(error:Error)

                    {

                        Alert.show("SET: catch Error "+ error.message, "Alert", Alert.OK, this);

                    }

                }

                else

                {

                    Alert.show("SET: Not Supported Os", "Alert", Alert.OK, this);

                }

            }

            protected function btnremoveAutoStart_clickHandler(event:MouseEvent):void

            {

                if(NativeApplication.supportsStartAtLogin)

                {

                    try

                    {

                        nativeApplication.startAtLogin = false;

                    }

                    catch(error:Error)

                    {

                        Alert.show("REMOVE: catch Error "+ error.message, "Alert", Alert.OK, this);

                    }

                }

                else

                {

                    Alert.show("REMOVE: Not Supported Os", "Alert", Alert.OK, this);

                }

            }

            protected function btnCheckAutoStartStatus_clickHandler(event:MouseEvent):void

            {

                lblStatus.text = "";

                try

                {

                    lblStatus.text = nativeApplication.startAtLogin.toString();

                }

                catch(error:Error)

                {

                    trace(error.errorID + " : " + error.message);

                }

            }

        ]]>

    </fx:Script>

    <fx:Declarations>

        <!-- Place non-visual elements (e.g., services, value objects) here -->

    </fx:Declarations>

    <s:HGroup>

        <s:Button id="btnSetAutoStart"

                  click="btnSetAutoStart_clickHandler(event)"

                  label="Set Auto Start"/>

        <s:Button id="btnremoveAutoStart"

                  click="btnremoveAutoStart_clickHandler(event)"

                  label="removeAuto Start"/>

        <s:Button id="btnCheckAutoStartStatus"

                  click="btnCheckAutoStartStatus_clickHandler(event)"

                  label="Check Auto Start Status"/>

        <s:Label id="lblStatus"

                 fontSize="15" />

    </s:HGroup>

</s:WindowedApplication>

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2015 0
Community Beginner ,
Jul 10, 2015

Copy link to clipboard

Copied

have you tried producing a ".app" file instead of an ".exe"?

-> no i haven't tried it, there is no option to create .app in Flashbuilder, please let me know some detail

is your app located in the "Program Files (x86)" folder?

-> yes

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 10, 2015 0
Engaged ,
Jul 13, 2015

Copy link to clipboard

Copied

I can't answer on how to produce a ".app" file with FlashBuilder as I use Flash CS6 or CC to create my apps. Someone else here with more experience using FB will have to answer that. There might be some documentation from Adobe buried in their "help" files for publishing AIR apps using ADB paired with Terminal/Command Line.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 13, 2015 0