nurgent's Blog

Random thoughts and helpful IT tidbits

RemoteApp 2012 Pseudo Installer

So they removed RemoteApp publishing of MSI or RDP files from Server 2012. You can get the RDP file out, but it will require you to do a few things.

  1. Create a folder that you will place your shortcuts/batch file. I am using S:\Software\RemoteApp.
  2. Make a subfolder called 32 and one called 64 for the two CPU types (if needed)
  3. Connect your PC up to the RemoteApp Resources
  4. Go to your start menu, and find one of the published applications. Right click on it and select Open File Location
  5. Copy the shortcut to the 64 or 32 folder and rename it something more normal (in this example, RemoteApp, and I will be initially copying everything to the 64 folder)
  6. Go to the properties of the shortcut and get the location of the RDP file, it should be under your User\AppData\Roaming\Microsoft\Workspaces\{GUID} Folder
  7. Copy the icon from the Icons folder and the RDP file from the Resource folder into the 64 folder and rename the same as your shortcut
  8. Ensure the C:\Program Files (x86)\RemotePackages folder exists on your PC. You might not have it if you have not installed a RemoteApp 2008 MSI package.
  9. Copy the RDP and ICO file into the C:\Program Files (x86)\RemotePackages folder
  10. Right click on your shortcut in your 64 folder and change the target to the rdp file in C:\Program Files (x86)\RemotePackages folder and the icon to the icon in the C:\Program Files (x86)\RemotePackages folder
  11. Copy the contents of the 64 folder to the 32 folder
  12. Copy C:\Program Files (x86)\RemotePackages folder to C:\Program Files\RemotePackages
  13. Repeat the process for the shortcut in the 32 folder, pointing to the C:\Program Files\RemotePackages folder
  14. Make a batch file to act as your installer. Ensure that when you run the installer on a PC, you run it as administrator. This will copy the icon to the All Users desktop. If you wish for only specific users to get the link, you can remove copying the link to the all users desktop and drag and drop it to the local users desktop

Batch File for Install:
@Echo Off
IF EXIST "C:\Program Files (x86)" GOTO 64bit
GOTO 32Bit
:32Bit
Echo Installing 32 bit client
xcopy "\\dc01\shared\software\RemoteApp\32\RemoteApp.rdp" "C:\Program Files\RemotePackages\" /y /q
xcopy "\\dc01\shared\software\RemoteApp\32\RemoteApp.ico" "C:\Program Files\RemotePackages\" /y /q
xcopy "\\dc01\shared\software\RemoteApp\32\RemoteApp.lnk" C:\Users\Public\Desktop /y /q
Goto End

:64Bit
Echo installing 64 bit client
xcopy “\\dc01\shared\software\RemoteApp\64\RemoteApp.rdp” “C:\Program Files (x86)\RemotePackages\” /y /q
xcopy “\\dc01\shared\software\RemoteApp\64\RemoteApp.ico” “C:\Program Files (x86)\RemotePackages\” /y /q
xcopy “\\dc01\shared\software\RemoteApp\64\RemoteApp.lnk” C:\Users\Public\Desktop /y /q

:End
Echo Completed.
pause

Now, if you are like me, and needed to push the RemoteApp to PC’s over the network without having to visit each of them, I modified the script to prompt for a workstation and push over the network.

@Echo Off
Set /P Workstation=Enter Workstation Name: %=%
IF EXIST "\\%Workstation%\c$\Program Files (x86)" GOTO 64bit
GOTO 32Bit
:32Bit
Echo Installing 32 bit client
xcopy \\dc01\shared\software\RemoteApp\32\RemoteApp.rdp "\\%Workstation%\c$\Program Files\RemotePackages\" /y /q
xcopy \\dc01\shared\software\RemoteApp\32\RemoteApp.ico "\\%Workstation%\c$\Program Files\RemotePackages\" /y /q
xcopy "\\dc01\shared\software\RemoteApp\32\RemoteApp.lnk" \\%Workstation%\c$\Users\Public\Desktop /y /q
GOTO End

:64Bit
Echo installing 64 bit client
xcopy \\dc01\shared\software\RemoteApp\64\RemoteApp.rdp “\\%Workstation%\c$\Program Files (x86)\RemotePackages\” /y /q
xcopy \\dc01\shared\software\RemoteApp\64\RemoteApp.ico “\\%Workstation%\c$\Program Files (x86)\RemotePackages\” /y /q
xcopy “\\dc01\shared\software\RemoteApp\64\RemoteApp.lnk” \\%Workstation%\c$\Users\Public\Desktop /y /q

:End
Echo Completed.
pause

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on November 12, 2013 by in IT, RemoteApp, Scripting and tagged , .
%d bloggers like this: