locked
App V 5 - Start sequenced app with a shortcut switch ? RRS feed

  • Question

  • Hi Guys,

    Im packaging in an app that requires the program shortcut has a switch after it.

    eg NavCad.exe /s157.211.1.102

    I have included the deployment.xml below , could someone let me know where i can alter the .exe so it uses the above switch - i assume i need to alter the shortcut somewhere?

    Thanks!

    <!--
    This is your sample dynamic deployment configuration.  Use this to override machine wide and per user
    elements within your sequenced package.  The document is pre-filled with data from your sequenced package.
    Customize the document to fit your needs before adding your package.
    -->
    <DeploymentConfiguration PackageId="f793d8a7-6ee2-4e3a-942e-7fc110c3ebf7" DisplayName="NavCad" IgnorableNamespaces="" xmlns="http://schemas.microsoft.com/appv/2010/deploymentconfiguration">
      <!--            
     
      Per User Configuration
         
      -->
      <UserConfiguration>
        <Subsystems>
          <!--OVERRIDE BEHAVIOR OF MANIFEST AND CONFIGURATION FILES
      Integration Subsystems can be enabled and disabled independently of the content.
      Thus if Shortcuts are enabled, The client will use the shortcuts contained within
      the manifest by default.
                   
      Each Integration Subsystem can contain an <Extensions /> node. If this child element
      is present, the client will ignore the content in the Manifest file for that subsystem
      and only use the content in the configuration file.
                   
      e.g. for the shortcuts subsystem,
      (A)
      if the user defined this in either the dynamic or deployment config file:            
              <Shortcuts  Enabled="true">
                      <Extensions>
                              ...
                      </Extensions>
              </Shortcuts>
                   
      Content in the manifest will be ignored.
                   
      (B)
      IF the user defined only this:               
              <Shortcuts  Enabled="true"/>
      Then the content in the Manifest will be integrated during publishing.
                   
      (C)
      note that if the user defines this:
              <Shortcuts  Enabled="true">
                      <Extensions/>
              </Shortcuts>
                   
      Then all the Shortcuts within the manifest will still be ignored.
      There will be no shortcuts integrated.-->
          <!--
         
          Shortcuts
         
          -->
          <Shortcuts Enabled="true">
            <Extensions>
              <Extension Category="AppV.Shortcut">
                <Shortcut>
                  <File>[{Common Programs}]\HydroComp\NavCad\NavCad 2009.lnk</File>
                  <Target>[{AppVPackageRoot}]\NavCad2009.exe</Target>
                  <Icon>[{Windows}]\Installer\{E4611897-6AA5-4FF8-BF52-DDDFCBA696A9}\NewShortcut41_F553A3FEE2194DD2B5C800C4D6E344C3.exe.0.ico</Icon>
                  <Arguments />
                  <WorkingDirectory />
                  <ApplicationId>[{AppVPackageRoot}]\NavCad2009.exe</ApplicationId>
                </Shortcut>
              </Extension>
              <Extension Category="AppV.Shortcut">
                <Shortcut>
                  <File>[{Common Programs}]\HydroComp\NavCad\License Viewer\License Viewer.lnk</File>
                  <Target>[{ProgramFilesCommonX86}]\HydroComp Shared\License Viewer\HCLicMgr.exe</Target>
                  <Icon>[{Windows}]\Installer\{E4611897-6AA5-4FF8-BF52-DDDFCBA696A9}\NewShortcut2_9CB7AF305C5747DE8C21A99920EC69D1.exe.0.ico</Icon>
                  <Arguments />
                  <WorkingDirectory />
                  <ApplicationId>[{ProgramFilesCommonX86}]\HydroComp Shared\License Viewer\HCLicMgr.exe</ApplicationId>
                </Shortcut>
              </Extension>
              <Extension Category="AppV.Shortcut">
                <Shortcut>
                  <File>[{Common Programs}]\HydroComp\NavCad\NavCad 2009 Help.lnk</File>
                  <Target>[{AppVPackageRoot}]\NavCad2009.chm</Target>
                  <Icon>[{System}]\shell32.dll.2.ico</Icon>
                  <Arguments />
                  <WorkingDirectory />
                  <ApplicationId>[{AppVPackageRoot}]\NavCad2009.chm</ApplicationId>
                </Shortcut>
              </Extension>
              <Extension Category="AppV.Shortcut">
                <Shortcut>
                  <File>[{Common Programs}]\HydroComp\NavCad\Documents\NavCad 2009 User's Guide [PDF].lnk</File>
                  <Target>[{AppVPackageRoot}]\Documents\NavCad2009UsersGuide.pdf</Target>
                  <Icon>[{System}]\shell32.dll.2.ico</Icon>
                  <Arguments />
                  <WorkingDirectory />
                  <ApplicationId>[{AppVPackageRoot}]\Documents\NavCad2009UsersGuide.pdf</ApplicationId>
                </Shortcut>
              </Extension>
              <Extension Category="AppV.Shortcut">
                <Shortcut>
                  <File>[{Common Programs}]\HydroComp\NavCad\License Viewer\License Viewer Help.lnk</File>
                  <Target>[{ProgramFilesCommonX86}]\HydroComp Shared\License Viewer\HCLICMGR.HLP</Target>
                  <Icon>[{System}]\shell32.dll.2.ico</Icon>
                  <Arguments />
                  <WorkingDirectory />
                  <ApplicationId>[{ProgramFilesCommonX86}]\HydroComp Shared\License Viewer\HCLICMGR.HLP</ApplicationId>
                </Shortcut>
              </Extension>
            </Extensions>
          </Shortcuts>
          <!--
         
          File Type Associations      
         
          -->
          <FileTypeAssociations Enabled="true">
            <Extensions>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.ImageComboCtl</Name>
                    <Description>Microsoft ImageComboBox Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.ImageComboCtl.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.ImageListCtrl</Name>
                    <Description>Microsoft ImageList Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.ImageListCtrl.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.ProgCtrl</Name>
                    <Description>Microsoft ProgressBar Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.ProgCtrl.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.TreeCtrl</Name>
                    <Description>Microsoft TreeView Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.TreeCtrl.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.ListViewCtrl</Name>
                    <Description>Microsoft ListView Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.ListViewCtrl.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.Slider</Name>
                    <Description>Microsoft Slider Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.Slider.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.SBarCtrl</Name>
                    <Description>Microsoft StatusBar Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.SBarCtrl.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.TabStrip</Name>
                    <Description>Microsoft TabStrip Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.TabStrip.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComctlLib.Toolbar</Name>
                    <Description>Microsoft Toolbar Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComctlLib.Toolbar.2</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSComDlg.CommonDialog</Name>
                    <Description>Microsoft Common Dialog Control, version 6.0</Description>
                    <CurrentVersionProgId>MSComDlg.CommonDialog.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSMAPI.MAPIMessages</Name>
                    <Description>Microsoft MAPI Messages Control, version 6.0</Description>
                    <CurrentVersionProgId>MSMAPI.MAPIMessages.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSMAPI.MAPISession</Name>
                    <Description>Microsoft MAPI Session Control, version 6.0</Description>
                    <CurrentVersionProgId>MSMAPI.MAPISession.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSSTDFMT.StdDataFormat</Name>
                    <Description>StdDataFormat Object</Description>
                    <CurrentVersionProgId>MSSTDFMT.StdDataFormat.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSSTDFMT.StdDataFormats</Name>
                    <Description>StdDataFormats Object</Description>
                    <CurrentVersionProgId>MSSTDFMT.StdDataFormats.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>MSSTDFMT.StdDataValue</Name>
                    <Description>StdDataValue Object</Description>
                    <CurrentVersionProgId>MSSTDFMT.StdDataValue.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
              <Extension Category="AppV.FileTypeAssociation">
                <FileTypeAssociation>
                  <ProgId>
                    <Name>TabDlg.SSTab</Name>
                    <Description>Microsoft Tabbed Dialog Control, version 6.0</Description>
                    <CurrentVersionProgId>TabDlg.SSTab.1</CurrentVersionProgId>
                  </ProgId>
                </FileTypeAssociation>
              </Extension>
            </Extensions>
          </FileTypeAssociations>
          <!--
         
          URL Protocols
         
          -->
          <URLProtocols Enabled="true">
            <!--
                 
              <Extensions>
                <Extension Category="AppV.URLProtocol">
                  <URLProtocol>
                    <Name>mailto</Name>
                    <ApplicationURLProtocol>
                      <DefaultIcon>[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE,-9403</DefaultIcon>
                      <EditFlags>2</EditFlags>
                      <Description />
                      <AppUserModelId />
                      <FriendlyTypeName />
                      <InfoTip />
                      <SourceFilter />
                      <ShellFolder />
                      <WebNavigableCLSID />
                      <ExplorerFlags>2</ExplorerFlags>
                      <CLSID />
                      <ShellCommands>
                        <DefaultCommand>open</DefaultCommand>
                        <ShellCommand>
                          <ApplicationId>[{ProgramFilesX86}]\Microsoft Contoso\Contoso\contosomail.EXE</ApplicationId>
                          <Name>open</Name>
                          <CommandLine>[{ProgramFilesX86}\Microsoft Contoso\Contoso\contosomail.EXE" -c OEP.Note /m "%1"</CommandLine>
                          <DropTargetClassId />
                          <FriendlyName />
                          <Extended>0</Extended>
                          <LegacyDisable>0</LegacyDisable>
                          <SuppressionPolicy>2</SuppressionPolicy>
                          <DdeExec>
                            <NoActivateHandler />
                            <Application>contosomail</Application>
                            <Topic>ShellSystem</Topic>
                            <IfExec>[SHELLNOOP]</IfExec>
                            <DdeCommand>[SetForeground][ShellNewDatabase "%1"]</DdeCommand>
                          </DdeExec>
                        </ShellCommand>
                      </ShellCommands>
                    </ApplicationURLProtocol>
                  </URLProtocol>
                </Extension>
              </Extensions>
                 
                -->
          </URLProtocols>
          <!--
         
          COM
         
          -->
          <COM Mode="Isolated">
            <IntegratedCOMAttributes OutOfProcessEnabled="true" InProcessEnabled="false" />
          </COM>
          <!--
         
          Objects
         
          -->
          <Objects Enabled="true" />
          <!--
         
          Virtual Registry
         
          -->
          <Registry Enabled="true">
            <!--
             
              <Include>
                <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Foo">
                  <Value Type="REG_SZ" Name="Bar" Data="NewValue"/>
                </Key>
                <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\EmptyKey"/>
              </Include>
             
            -->
            <!--
             
              <Delete>
                <Key Path="\REGISTRY\USER\[{AppVCurrentUserSID}]\Software\Foo\BarDelete"/>
              </Delete>
             
            -->
          </Registry>
          <!--
         
          Virtual File System
         
          -->
          <FileSystem Enabled="true" />
          <!--
         
          Fonts
         
          -->
          <Fonts Enabled="true" />
          <!--
         
          Environment Variables
         
          -->
          <EnvironmentVariables Enabled="true" />
          <!--
         
          Services
         
          -->
          <Services Enabled="true" />
        </Subsystems>
        <!--
         
        Applications
         
        -->
        <Applications>
          <Application Id="[{AppVPackageRoot}]\NavCad2009.exe" Enabled="true">
            <VisualElements>
              <Name>NavCad 2009</Name>
              <Icon />
              <Description />
            </VisualElements>
          </Application>
          <Application Id="[{ProgramFilesCommonX86}]\HydroComp Shared\License Viewer\HCLicMgr.exe" Enabled="true">
            <VisualElements>
              <Name>License Viewer</Name>
              <Icon />
              <Description />
            </VisualElements>
          </Application>
          <Application Id="[{AppVPackageRoot}]\NavCad2009.chm" Enabled="true">
            <VisualElements>
              <Name>NavCad 2009 Help</Name>
              <Icon />
              <Description />
            </VisualElements>
          </Application>
          <Application Id="[{AppVPackageRoot}]\Documents\NavCad2009UsersGuide.pdf" Enabled="true">
            <VisualElements>
              <Name>NavCad 2009 User's Guide [PDF]</Name>
              <Icon />
              <Description />
            </VisualElements>
          </Application>
          <Application Id="[{ProgramFilesCommonX86}]\HydroComp Shared\License Viewer\HCLICMGR.HLP" Enabled="true">
            <VisualElements>
              <Name>License Viewer Help</Name>
              <Icon />
              <Description />
            </VisualElements>
          </Application>
        </Applications>
        <!-- User Scripts Example - customize and uncomment to use user scripts -->
        <!--
         
        <UserScripts>
          <StartProcess RunInVirtualEnvironment="true">
            <Path>VFS\ProgramFilesX86\App\dosomething.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="true"/>
            <ApplicationId>[{AppVPackageRoot}]\Contoso\ContosoApp.EXE</ApplicationId>
          </StartProcess>
          <ExitProcess>
            <Path>VFS\ProgramFilesX86\App\UnDoSomething.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="false"/>
            <ApplicationId>[{AppVPackageRoot}]\Contoso\ContosoApp.EXE</ApplicationId>
          </ExitProcess>
         
          <StartVirtualEnvironment  RunInVirtualEnvironment="true">
            <Path>[{AppVPackageRoot}]\VFS\ProgramFilesX86\App\DoSomething.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="true"/>
          </StartVirtualEnvironment>
       
          <TerminateVirtualEnvironment>
            <Path>[{AppVPackageRoot}]\VFS\ProgramFilesX86\App\UnDoSomething.exe</Path>
            <Arguments>-WithArgs</Arguments>
          <Wait RollbackOnError="false"/>
          </TerminateVirtualEnvironment>
          <PublishPackage>
            <Path>\\server\share\foobar.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </PublishPackage>
          <UnpublishPackage>
            <Path>\\server\share\barfoo.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="false" Timeout="30"/>
          </UnpublishPackage>
        </UserScripts>
       
        -->
      </UserConfiguration>
      <!--
               
      Machine Wide Configuration
         
      -->
      <MachineConfiguration>
        <!--
               
        Product Source URL Opt Out
         
        -->
        <ProductSourceURLOptOut Enabled="true" />
        <Subsystems>
          <!--
                 
          Machine Wide Virtual Registry
         
          -->
          <Registry>
            <!--
            <Include>
              <Key Path="\REGISTRY\Machine\Software\Foo">
              <Value Type="REG_SZ" Name="Bar" Data="Baz"/>
              </Key>
              <Key Path="\REGISTRY\Machine\Software\EmptyKey"/>
            </Include>
            -->
            <!--
            <Delete>
              <Key  Path="\REGISTRY\Machine\Software\Foo\BarDelete"/>
            </Delete>
            -->
          </Registry>
        </Subsystems>
        <!-- Machine Scripts Example - customize and uncomment to use machine scripts -->
        <!--
        <MachineScripts>
          <PublishPackage>
            <Path>\\server\share\foobar.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </PublishPackage>
          <UnpublishPackage>
            <Path>\\server\share\barfoo.exe</Path>
            <Arguments>-WithArgs</Arguments>
            <Wait RollbackOnError="false" Timeout="30"/>
          </UnpublishPackage>
         
          <AddPackage>
            <Path>[{PackageRoot}]\VFS\ProgramFilesX86\App\InstallDriver.exe</Path>
            <Arguments>-DriverName Printer-Visibility Northamerica</Arguments>
            <Wait RollbackOnError="true" Timeout="30"/>
          </AddPackage>
          <RemovePackage>
            <Path>[{PackageRoot}]\VFS\ProgramFilesX86\App\InstallDriver.exe</Path>
            <Arguments>-Uninstall</Arguments>
            <Wait RollbackOnError="false" Timeout="60"/>
          </RemovePackage>
        </MachineScripts>
        -->
        <!--
         
          Terminate Child Processes
         
          -->
        <TerminateChildProcesses>
          <!--
                <Application Path="[{AppVPackageRoot}]\Contoso\ContosoApp.EXE" />
              -->
        </TerminateChildProcesses>
      </MachineConfiguration>
    </DeploymentConfiguration>

    Sunday, October 20, 2013 10:50 PM

Answers

  • In the shortcuts section, add the parameters to that specific shortcut within the Arguments part:

    <Shortcut>
    	<File>[{Common Programs}]\HydroComp\NavCad\NavCad 2009.lnk</File>
    	<Target>[{AppVPackageRoot}]\NavCad2009.exe</Target>
    	<Icon>[{Windows}]\Installer\{E4611897-6AA5-4FF8-BF52-DDDFCBA696A9}\NewShortcut41_F553A3FEE2194DD2B5C800C4D6E344C3.exe.0.ico</Icon>
    	<Arguments>/s157.211.1.102</Arguments>
    	<WorkingDirectory />
    	<ApplicationId>[{AppVPackageRoot}]\NavCad2009.exe</ApplicationId>
    </Shortcut>
    Then import the modified deployment config into the managementconsole (or whatever method you use to deploy).

    Monday, October 21, 2013 6:01 AM

All replies

  • In the shortcuts section, add the parameters to that specific shortcut within the Arguments part:

    <Shortcut>
    	<File>[{Common Programs}]\HydroComp\NavCad\NavCad 2009.lnk</File>
    	<Target>[{AppVPackageRoot}]\NavCad2009.exe</Target>
    	<Icon>[{Windows}]\Installer\{E4611897-6AA5-4FF8-BF52-DDDFCBA696A9}\NewShortcut41_F553A3FEE2194DD2B5C800C4D6E344C3.exe.0.ico</Icon>
    	<Arguments>/s157.211.1.102</Arguments>
    	<WorkingDirectory />
    	<ApplicationId>[{AppVPackageRoot}]\NavCad2009.exe</ApplicationId>
    </Shortcut>
    Then import the modified deployment config into the managementconsole (or whatever method you use to deploy).

    Monday, October 21, 2013 6:01 AM
  • If 'all' users Need that switch, you could add it during Sequencing as a Parameter of the executable, the Sequencer than pick this up.

    If you want to do it afterwards, you'd indeed have to modify your deploymentconfig XML or userconfig.XML as highlighted by Sander. Remember that you have to 'apply' your modification, which varies depending on your deployment method (see http://kirxblog.wordpress.com/2013/09/09/deployment-models-and-dynamic-configurations-in-app-v-5/)

     

    Falko

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

    Monday, October 21, 2013 10:59 AM
    Moderator