Hello to all,
The problem i am facing is:
Created MSI deployment in the " PSDeployment Toolkit" then there is an extra copy action. place 2 shorcuts into the folder C:\appdata\microsoft\wondows\startmenu.
The first action “install MSI” is no problem, however the second action seems not to work.
I would like to place the 2 shortcuts in the startmenu sould also be no problem however, the tricky part is:
It should be a shortcut depending on the location of the computer.
What I have tried is:
$computer=Get-WmiObject -class Win32_Computersystem
if ($computer.name -like (“PC1”)) {
Copy-file -path “$dirSupportFiles\program1 - lacation1.lnk” -destination “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\My Applications\program” -recurse }
elseif ($computer -like (“PC2”)) {
Copy-file -Path “$dirSupportFiles\program2 - location2.lnk” -destination “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\My Applications\program” -recurse }
the shortcuts not copy to the machine it should
seems to work only when I use it local.
Also the command: $Computer=[System.Environment]::Machinename is not working.
what do I miss here?
I am using the PSappdeploy toolkit as “application” in SCCM 2012