none
Creating an application that is a shortcut to a vbscript

    Question

  • Here is how I am trying to do this.  I think if I could get the file path to work correctly in PARAMETERS tag it would work.  But it seems to just append the file path in PARAMETERS to the FILENAME which is c:\Windows\system32\wscript.exe.

    <SOFTPKG GUID="DB8FE5D7-5DE0-4433-A456-5A4B7B089065" NAME="Hyperspace Workflow Tracer" VERSION="1.0">

    <IMPLEMENTATION>
    <CODEBASE HREF="HTTP://<servername>:80/Content/EPIC2012.trace/Epic Hyperspace 2012 Workflow Tracer_13.sft" GUID="C975D5D3-05B5-4789-AD4F-DA7AF432A659" SYSGUARDFILE="Epic2012.trace\osguard.cp" SIZE="3900344661" PARAMETERS="Epic2012.trace\VFS\CSIDL_PROGRAM_FILES\Epic\v7.9\Shared Files\Sample_WorkflowTracer_launch_script_prd.vbs" FILENAME="c:\Windows\system32\wscript.exe"/>
    <VIRTUALENV TERMINATECHILDREN="FALSE">

    Any help is appreciated!

    Drew

    Wednesday, May 21, 2014 8:34 PM

Answers

  • In order to put "..." into the parameter string, you could use its XML relevant  &quot;

    PARAMETERS = "&quot;C:\Program Files\Subfolder with spaces&quot;"

    As an alternative, you could try to figure out the file and folder's short names.

    Also note that you should specify the full path (including the virtual drive letter) to your script - as you can see in your error message, wscript thinks that the script is located in the Epic2012.tracce subfolder underneath of system32.

    As a best practice, use %SFT_MNT% as a bullet-proof replacement for your virtual drive letter. This variable is available _inside_ the virtual environment

    PARAMETERS = "&quot;%SFT_MNT%\Epic2012.trace\VFS\CSIDL_PROGRAM_FILES\Epic\v7.9\Shared Files\Sample_WorkflowTracer_launch_script_prd.vbs&quot;"


    Falko

    Twitter @kirk_tn   |   Blog kirxblog   |   Web kirx.org   |   Fireside appvbook.com

    • Marked as answer by Drew_Anderson Thursday, May 22, 2014 1:47 PM
    • Unmarked as answer by Drew_Anderson Thursday, May 22, 2014 4:35 PM
    • Marked as answer by Drew_Anderson Tuesday, May 27, 2014 8:20 PM
    Thursday, May 22, 2014 7:30 AM

All replies

  • I don't see the problem?

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

    Wednesday, May 21, 2014 8:44 PM
  • I will post a screenshot once I get my account TechNet verified.  

    But when I launch the app I get this message from Windows Script Host "There is no file extension in "c:\windows\system32\Epic2012.tracce\VFS\CSIDL_PROGRAM_FILES\Epic\v7.9\Shared".

    So it is concatenating the strings together.  I need a way to feed the path to the vbscript as a parameter to wscript.

    Wednesday, May 21, 2014 9:13 PM
  • It would seem that you need to append the Q:\ infront of Epic2012...?

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

    Wednesday, May 21, 2014 9:34 PM
  • Thanks Nicke.  I did just try that but no luck.  If I knew how to handle the space in "shared files" I would be fine.  But the PARAMETERS tag does not accept wildcards that I can tell.  Not sure about escape characters for that.

    My coworker suggested using a batch file to call the vbscript so I may give that a try.

    Wednesday, May 21, 2014 9:48 PM
  • In order to put "..." into the parameter string, you could use its XML relevant  &quot;

    PARAMETERS = "&quot;C:\Program Files\Subfolder with spaces&quot;"

    As an alternative, you could try to figure out the file and folder's short names.

    Also note that you should specify the full path (including the virtual drive letter) to your script - as you can see in your error message, wscript thinks that the script is located in the Epic2012.tracce subfolder underneath of system32.

    As a best practice, use %SFT_MNT% as a bullet-proof replacement for your virtual drive letter. This variable is available _inside_ the virtual environment

    PARAMETERS = "&quot;%SFT_MNT%\Epic2012.trace\VFS\CSIDL_PROGRAM_FILES\Epic\v7.9\Shared Files\Sample_WorkflowTracer_launch_script_prd.vbs&quot;"


    Falko

    Twitter @kirk_tn   |   Blog kirxblog   |   Web kirx.org   |   Fireside appvbook.com

    • Marked as answer by Drew_Anderson Thursday, May 22, 2014 1:47 PM
    • Unmarked as answer by Drew_Anderson Thursday, May 22, 2014 4:35 PM
    • Marked as answer by Drew_Anderson Tuesday, May 27, 2014 8:20 PM
    Thursday, May 22, 2014 7:30 AM
  • Thank you so much Falko.  Let me know if I should open a separate post (I am a noob on the forum) but I do have a followup issue.

    When I try to create feature block 1.  I get a "server execution failed" error on the following "call oReg" line.  Should I be pointing the script to the virtual registry?  Just confused at how to handle this.  I can include the entire vbscript if that would be helpful.

    call oReg.GetStringValue(HKEY_LOCAL_MACHINE, EPICKEY, VERSION, sEpicInstall)
    
    
    Set oFSO = CreateObject("Scripting.FileSystemObject")
    'Set oInstallDrive = oFSO.GetDrive(oFSO.GetDriveName(sEpicInstall))
    
    sCommandLine1 = """" & sEpicInstall & "\Shared Files\EpicD" & VERSION & ".exe"" EDAppServers" & VERSION & ".EpicApp Name=Desktop" & VERSION
    sCommandLine2 = """" & sEpicInstall & "\Shared Files\EpicDWorkflowTracer.exe"" /d:C:\CrashDumps\WorkflowTracer\DataFiles /n:250 /v /f"
    
    Set oWshShell = WScript.CreateObject("WScript.Shell")
    Call oWshShell.Run(sCommandLine1)
    Call oWshShell.Run(sCommandLine2)
    


    Thursday, May 22, 2014 4:46 PM
  • I got this to work by letting the Epic client launch as a normal app-v application and in the OSD script I added the Workflow Tracer as post launch script. 
    • Proposed as answer by kirk_tnMVP Friday, May 30, 2014 7:54 AM
    Tuesday, May 27, 2014 8:23 PM