Create PS Script in PowerShell App Deployment Toolkit (PSADTK) that will set multiple shortcuts

Closed Posted 5 years ago Paid on delivery
Closed Paid on delivery

Using PASDTK I have a script that sets various shortcuts with a single command line switch for each shortcut. I what to be able to set all the shortcuts with a new single switch.

Here is the code I have so far. I can run the script with the individual switches but want to be able to run for all switches as a single install.

Param (

[switch]$1st_Prod = $false,

[switch]$2nd_Prod = $false

)

If ($deploymentType -ine 'Uninstall') {

##*===============================================

##* PRE-INSTALLATION

##*===============================================

[string]$installPhase = 'Pre-Installation'

## Show Progress Message (with the default message)

##Show-InstallationProgress

## <Perform Pre-Installation tasks here>

#Create OSD Task Sequence Environment Object

If ($1st_Prod) {

[string]$MICS_LOC = '\\[login to view URL]'

[string]$MICS_Arg = 'CF=Arg1'

[string]$MICS_Sort_Name = '1st [login to view URL]'

}

ElseIf ($2nd_Prod) {

[string]$MICS_LOC = '\\[login to view URL]'

[string]$MICS_Arg = 'CF=Arg2'

[string]$MICS_Sort_Name = '2nd [login to view URL]'

}

##*===============================================

##* INSTALLATION

##*===============================================

[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\[login to view URL]" -Arguments $MICS_Arg -IconLocation "$MICS_LOC\sharedsw\MICSCONF_NSS\LaunchProd\[login to view URL]" -Description "[login to view URL]" -WorkingDirectory "$MICS_LOC\sharedsw\MICSCONF_NSS\LaunchProd"

Powershell Script Install Software Architecture

Project ID: #17077651

About the project

2 proposals Remote project Active 5 years ago

2 freelancers are bidding on average $20 for this job

Venkateshkistam

Hi i can give you solution quickly for your problem. i have 3 yrs of experience in powershell and i have done some automations as well.

$10 USD in 1 day
(0 Reviews)
0.0