Setting multiple Shortcuts

//Setting multiple Shortcuts
Setting multiple Shortcuts2018-05-30T22:56:36+00:00

The Toolkit Forums General Setting multiple Shortcuts

  • Author
  • Scott
    Post count: 3

    I hope I can find some help here.

    I have a script set that with a switch I can install a shortcut for a specific instance. I have 10 instances which I will set each in SCCM for each need. I am looking for a way I can have an instance that wil set all 10 with a single switch

    This is an example of what I have for the individual items

    <pre class=”brush: powershell; gutter: true; first-line: 1; highlight: []; html-script: false”>
    Param (
    [switch]$1st_Prod = $false,
    [switch]$2nd_Prod = $false

    If ($deploymentType -ine 'Uninstall') {
    [string]$installPhase = 'Pre-Installation'
    ## Show Progress Message (with the default message)

    ## <Perform Pre-Installation tasks here>
    #Create OSD Task Sequence Environment Object

    If ($1st_Prod) {
    [string]$MICS_LOC = '\\'
    [string]$MICS_Arg = 'CF=Arg1'
    [string]$MICS_Sort_Name = '1st Prod.lnk'
    ElseIf ($2nd_Prod) {
    [string]$MICS_LOC = '\\'
    [string]$MICS_Arg = 'CF=Arg2'
    [string]$MICS_Sort_Name = '2nd Prod.lnk'

    [string]$installPhase = 'Installation'

    ##Show-InstallationProgress -StatusMessage 'Installing SAPPI MICS Client. Please wait…'

    Write-Log -Message "Installation of MICS Client bit has started. addComponentsOnly: $addComponentsOnly isServerOS: $isServerOS" -Source $deployAppScriptFriendlyName

    New-Shortcut -Path "$envAppData\Microsoft\Windows\Start Menu\Programs\MICS\$MICS_Sort_Name" -TargetPath "$MICS_LOC\sharedsw\MICSCONF_NSS\LaunchProd\ML_Launch.exe" -Arguments $MICS_Arg -IconLocation "$MICS_LOC\sharedsw\MICSCONF_NSS\LaunchProd\ML_Launch.exe" -Description "ML_Launch.exe" -WorkingDirectory "$MICS_LOC\sharedsw\MICSCONF_NSS\LaunchProd"

    This is a snippet to give an idea. I suspect I may need some type of looping but not sure what is needed.

    Your help would be greatly appreciated and beers are certainly to be provided.



You must be logged in to reply to this topic.