locked
how do i quit the load of app-v application after pre-launch script RRS feed

  • Question

  • my app-v require .Net 4 in order to work.

    i added pre-launch script that check if .Net 4 is local installed and display to the user that he need to install it if it does not exist.

    i want to quit the load of my app-v if the script result that .Net is not installed and not to continue the load.

    because now after the script message the application show "Unknown error" and this is because the .Net is not installed.

    any suggestions?

    Tuesday, September 11, 2012 9:17 AM

Answers

  • thanks again for your suggestion but i found my solution.

    it seems that my app-v client version was the issue. i had version 4.6.2 that ignores the "ABORTRESULT".

    i updated to 4.6.3 and the app exit quietly with no popups.

    • Marked as answer by Asaf Magen Sunday, October 7, 2012 9:20 PM
    Sunday, October 7, 2012 9:19 PM

All replies

  • Hello,

    See the OSD-reference;

    http://www.tmurgent.com/osd_illustrated.aspx

    There are two possibilites explained there - SUCCESSRESULT / ABORTRESULT


    Nicke Källén | The Knack| Twitter: @Znackattack

    • Proposed as answer by Aaron.ParkerModerator Tuesday, September 11, 2012 3:41 PM
    • Marked as answer by Asaf Magen Wednesday, September 12, 2012 11:05 AM
    • Unmarked as answer by Asaf Magen Wednesday, September 19, 2012 8:39 AM
    Tuesday, September 11, 2012 9:40 AM
  • i added the SUCCESSRESULT="1" to my PRE-LAUNCH i got this message and then my app-v does not load.

    so basically your recommendation worked.

    any way to avoid this message or replace it?

    <SCRIPT EVENT="LAUNCH" PROTECT="FALSE" TIMING="PRE" WAIT="TRUE" SUCCESSRESULT="1" EXTERN="TRUE">
    <SCRIPTBODY>call "%windir%\\Temp\AppV\CheckDotNet.vbs" \n</SCRIPTBODY>
    </SCRIPT>

    exit code -1 error

    Wednesday, September 12, 2012 10:05 AM
  • Hello,

    I googled app-v error message change and got this;

    http://blog.wortell.nl/sanderz/customizing-app-v-client-error-messages/


    Nicke Källén | The Knack| Twitter: @Znackattack

    • Marked as answer by Asaf Magen Wednesday, September 12, 2012 11:28 AM
    • Unmarked as answer by Asaf Magen Wednesday, September 19, 2012 8:39 AM
    Wednesday, September 12, 2012 10:31 AM
  • i tried to run my app-v with ABORTRESULT="1" to abort the launch of my program with no app-v client message as i mention earlier.

    but from some reason it ignoring any exit code and launching my app-v every time.

    i read here http://social.technet.microsoft.com/Forums/en/appvclients/thread/c004b156-8d98-4743-bea4-08bd8b8193d6 that this is Microsoft bug , but i'm not sure because it very old.

    can some please assist?

    <SCRIPT EVENT="LAUNCH" PROTECT="FALSE" TIMING="PRE" WAIT="TRUE" ABORTRESULT="1">

    <SCRIPTBODY>call "%windir%\\Temp\AppV\CheckDotNet.vbs" \n </SCRIPTBODY>
    </SCRIPT>

    DotNet4Full = ReadRegDw(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full", "Install", 64)

    If DotNet4Full <> 1 Or IsNull(DotNet4Full) Then
     MsgBox "Microsoft .NET Framework 4.0 Full Profile is NOT Installed",64,".Net 4 Check"
     WScript.Quit(1)
    End If

    WScript.Quit(0)

    Thursday, September 13, 2012 1:06 PM
  • Hi Asaf,

    i think you should first read this

    http://blogs.technet.com/b/appv/archive/2007/10/11/scripting-within-an-osd-file.aspx

    and pay special atention how to write the paths in OSD scripting.

    Thursday, September 20, 2012 12:02 PM
  • <SCRIPT EVENT="LAUNCH" PROTECT="FALSE" TIMING="PRE" WAIT="TRUE" ABORTRESULT="1">
    <SCRIPTBODY>call "%windir%\\Temp\AppV\CheckDotNet.vbs" \n </SCRIPTBODY>
    </SCRIPT>

    You need double backslashes inside the <SCRIPTBODY>-tag.

    For example:

    <SCRIPTBODY> 
    @CALL \\\\server\\share\\folderName\\script.cmd \n
    </SCRIPTBODY>
    
    Thursday, September 20, 2012 12:40 PM
  • thanks for yours reply,

    oops my bad...but this is not my issue because even if the path is correct and my script do run i still cant kill my app-v with the ABORTRESULT="1".

    from some reason my app-v still loads.

    if i write SUCCESSRESULT="1" my app-v does not load and i get the error as i added in this thread earlier.

    i want to quietly kill my app with no error. 

    Friday, September 21, 2012 11:42 AM
  • Hello,

    Do the following

      •  Create a script that does what it should do
      • Measure if it should start the application or not
      • If it should start - start your executable. If it should not start - exit the script
      • Create your App-V package.
      • Replace your shortcut for the application with a shortcut to the script instead

    This is the same process as for a natively installed application


    Nicke Källén | The Knack| Twitter: @Znackattack


    • Edited by znack Friday, September 21, 2012 12:18 PM
    Friday, September 21, 2012 11:59 AM
  • sound like a good idea,

    but im not sure how to.

    can you post some example?

    Tuesday, October 2, 2012 12:20 PM
  • Hello,

    I have no idea what you are checking for - but this is a sample IF-statement from a bat-file;

    IF EXIST C:\install.log (echo complete) ELSE (echo failed)

    Source; http://ss64.com/nt/if.html

    You could replace "echo completed" with the command of your choice obviously


    Nicke Källén | The Knack| Twitter: @Znackattack

    Tuesday, October 2, 2012 8:44 PM
  • thanks again for your suggestion but i found my solution.

    it seems that my app-v client version was the issue. i had version 4.6.2 that ignores the "ABORTRESULT".

    i updated to 4.6.3 and the app exit quietly with no popups.

    • Marked as answer by Asaf Magen Sunday, October 7, 2012 9:20 PM
    Sunday, October 7, 2012 9:19 PM