
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-11-2015 04:38 PM
Hi,
We would like to copy a file from our server's deploymentshare\exes folder to a local PC we would also like to create a shortcut on the desktop.
I have a Domain User setup against the share username and I am able to copy files from other locations on the server.
Is it best to do part in powershell and part in CMD Line?
If someone could supply some syntax commands I would appreciate it.
Thanks
Carl.
We would like to copy a file from our server's deploymentshare\exes folder to a local PC we would also like to create a shortcut on the desktop.
I have a Domain User setup against the share username and I am able to copy files from other locations on the server.
Is it best to do part in powershell and part in CMD Line?
If someone could supply some syntax commands I would appreciate it.
Thanks
Carl.
Solved! Go to Solution.
Labels:
- Labels:
-
General Discussion
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2015 04:04 PM
Copy file(s):
Action: Command
Command: cmd.exe /c xcopy.exe /Y {PackageShare}\Installers\PATH_TO\YOUR_FILES\*.* "C:\PATH TO\DESTINATION"
Create shortcut:
NOTE: Calls PowerShell script which is also shown below
Action: Command
Command: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command {PackageShare}\Installers\PATH_TO\YOUR_PS_SCRIPT\MakeLink.ps1
PowerShell script to create desktop shortcut:
# Create EMC Shortcut with modified Target Directory
#$DesktopPath = [Environment]::GetFolderPath("Desktop")
$DesktopPath = 'C:\Users\Public\Desktop'
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$DesktopPath\NAME OF YOUR SHORTCUT.lnk")
$Shortcut.TargetPath = "C:\PATH USED FOR TARGET\YOUR APPLICATION.EXE"
$Shortcut.Arguments = 'ANY EXTRA ARGUMENTS THAT SHOULD BE IN THE TARGET LINE'
$Shortcut.Save()
Action: Command
Command: cmd.exe /c xcopy.exe /Y {PackageShare}\Installers\PATH_TO\YOUR_FILES\*.* "C:\PATH TO\DESTINATION"
Create shortcut:
NOTE: Calls PowerShell script which is also shown below
Action: Command
Command: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command {PackageShare}\Installers\PATH_TO\YOUR_PS_SCRIPT\MakeLink.ps1
PowerShell script to create desktop shortcut:
# Create EMC Shortcut with modified Target Directory
#$DesktopPath = [Environment]::GetFolderPath("Desktop")
$DesktopPath = 'C:\Users\Public\Desktop'
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$DesktopPath\NAME OF YOUR SHORTCUT.lnk")
$Shortcut.TargetPath = "C:\PATH USED FOR TARGET\YOUR APPLICATION.EXE"
$Shortcut.Arguments = 'ANY EXTRA ARGUMENTS THAT SHOULD BE IN THE TARGET LINE'
$Shortcut.Save()
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2015 04:04 PM
Copy file(s):
Action: Command
Command: cmd.exe /c xcopy.exe /Y {PackageShare}\Installers\PATH_TO\YOUR_FILES\*.* "C:\PATH TO\DESTINATION"
Create shortcut:
NOTE: Calls PowerShell script which is also shown below
Action: Command
Command: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command {PackageShare}\Installers\PATH_TO\YOUR_PS_SCRIPT\MakeLink.ps1
PowerShell script to create desktop shortcut:
# Create EMC Shortcut with modified Target Directory
#$DesktopPath = [Environment]::GetFolderPath("Desktop")
$DesktopPath = 'C:\Users\Public\Desktop'
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$DesktopPath\NAME OF YOUR SHORTCUT.lnk")
$Shortcut.TargetPath = "C:\PATH USED FOR TARGET\YOUR APPLICATION.EXE"
$Shortcut.Arguments = 'ANY EXTRA ARGUMENTS THAT SHOULD BE IN THE TARGET LINE'
$Shortcut.Save()
Action: Command
Command: cmd.exe /c xcopy.exe /Y {PackageShare}\Installers\PATH_TO\YOUR_FILES\*.* "C:\PATH TO\DESTINATION"
Create shortcut:
NOTE: Calls PowerShell script which is also shown below
Action: Command
Command: powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -Command {PackageShare}\Installers\PATH_TO\YOUR_PS_SCRIPT\MakeLink.ps1
PowerShell script to create desktop shortcut:
# Create EMC Shortcut with modified Target Directory
#$DesktopPath = [Environment]::GetFolderPath("Desktop")
$DesktopPath = 'C:\Users\Public\Desktop'
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$DesktopPath\NAME OF YOUR SHORTCUT.lnk")
$Shortcut.TargetPath = "C:\PATH USED FOR TARGET\YOUR APPLICATION.EXE"
$Shortcut.Arguments = 'ANY EXTRA ARGUMENTS THAT SHOULD BE IN THE TARGET LINE'
$Shortcut.Save()
