2017-06-20 21:59:39 +03:00
|
|
|
<#
|
|
|
|
|
|
|
|
.SYNOPSIS
|
|
|
|
Script to create help short cut and solution folder shortcut.
|
|
|
|
|
|
|
|
.PARAMETER helpfile
|
|
|
|
path to the help url file.
|
|
|
|
|
|
|
|
.PARAMETER solutionPath
|
|
|
|
path to the solution folder with data and source.
|
|
|
|
|
|
|
|
#>
|
2017-06-20 22:50:31 +03:00
|
|
|
[CmdletBinding()]
|
|
|
|
param(
|
2017-06-20 22:57:20 +03:00
|
|
|
[parameter(Mandatory=$true, Position=1, ParameterSetName = "LCR")]
|
2017-06-20 22:50:31 +03:00
|
|
|
[ValidateNotNullOrEmpty()]
|
|
|
|
[string]$helpfile,
|
|
|
|
|
2017-06-20 22:57:20 +03:00
|
|
|
[parameter(Mandatory=$true, Position=2, ParameterSetName = "LCR")]
|
2017-06-20 22:50:31 +03:00
|
|
|
[ValidateNotNullOrEmpty()]
|
|
|
|
[string]$solutionPath
|
|
|
|
)
|
2017-06-15 22:49:50 +03:00
|
|
|
|
|
|
|
#git clone
|
|
|
|
$desktop = [Environment]::GetFolderPath("Desktop")
|
|
|
|
|
|
|
|
$desktop = $desktop + '\'
|
|
|
|
|
|
|
|
#create the help link in startup program
|
|
|
|
|
|
|
|
$startmenu = [Environment]::GetFolderPath("StartMenu")
|
|
|
|
$startupfolder = $startmenu + '\Programs\Startup\'
|
|
|
|
# We create this since the user startup folder is only created after first login
|
|
|
|
# Alternative is to add is to all user startup
|
|
|
|
mkdir $startupfolder
|
|
|
|
#copy
|
|
|
|
$down = $helpfile
|
|
|
|
Write-Host $down
|
|
|
|
Write-Host $startmenu
|
|
|
|
ls $startmenu
|
|
|
|
Write-Host $startupfolder
|
|
|
|
ls $startupfolder
|
|
|
|
cp -Verbose $down $startupfolder
|
2017-06-16 22:08:54 +03:00
|
|
|
cp -Verbose $down $desktop
|
|
|
|
|
|
|
|
#create shortcut to solution folder on desktop
|
|
|
|
$WsShell = New-Object -ComObject WScript.Shell
|
|
|
|
$shortcut = $WsShell.CreateShortcut($desktop + "LoanChargeOff.lnk")
|
|
|
|
$shortcut.TargetPath = $solutionPath
|
|
|
|
$shortcut.Save()
|