How to user START with spaces in the path

To run START builtin command launching a program with space on path is not enough to put the path in quotes but you should add also the TITLE.

On this example you are launching Internet Explorer without specify nothing on Title (first quotes):

start “” “C:\Program Files\Internet Explorer\iexplore.exe”

ERROR: Task Scheduler failed to start – Error Value: 2147942667

On task history you will find these 2 errors:

Event 103: Task Scheduler failed to start instance “{…}” of “…”  task for user “…”.
Additional Data: Error Value: 2147942667.

Event 203: Task Scheduler failed to launch action “…” in instance “…” of task “…”.
Additional Data: Error Value: 2147942667

Error code 2147942667 means that directory name is invalid. If you are sure to have typed correctly the path, check that on “Start In” field the path is written without quotes.

The path on “program/script” field must be surrounded by quotes if it contains spaces; the path on “Start In” field must not be surrounded by quotes.

How to Schedule Automatic Updates on Ubuntu Server 16.04

If is not there install unattended-upgrade package:

sudo apt-get install unattended-upgrades

or simply reconfigure the package:

sudo dpkg-reconfigure unattended-upgrades

If needed, configure the proxy for apt:

 echo ‘Acquire::http::Proxy “http://%5B2001:db8:abcd:3f0d::1]:8123/”;’ | sudo tee –append /etc/apt/apt.conf

Then edit /etc/apt/apt.conf.d/10periodic configuring when update, upgrade and autoclean should run:

APT::Periodic::Update-Package-Lists "1";
APT::Periodic::Download-Upgradeable-Packages "7";
APT::Periodic::AutocleanInterval "14";
APT::Periodic::Unattended-Upgrade "7";

Edit /etc/apt/apt.conf.d/50unattended-upgrades changing the setting for what kind of update you what to apply and when the machine should reboot:

// Automatically upgrade packages from these (origin:archive) pairs
Unattended-Upgrade::Allowed-Origins {
//      "${distro_id}:${distro_codename}-proposed";
//      "${distro_id}:${distro_codename}-backports";

// Automatically reboot *WITHOUT CONFIRMATION*
//  if the file /var/run/reboot-required is found after the upgrade
Unattended-Upgrade::Automatic-Reboot "true";

// If automatic reboot is enabled and needed, reboot at the specific
// time instead of immediately
//  Default: "now";
Unattended-Upgrade::Automatic-Reboot-Time "02:00";

If you what to run unattended-upgrade one a week only for example on Saturday…

touch -t 201608200200 /var/lib/apt/periodic/upgrade-stamp


How to Redirect only selected drive on RDP session

The option to add on .rdp file to redirect only selected drive (the default is every) is:


This redirect only drive C:

If you are working with Windows 2012 R2 Remote App, you should use powershell to add the required custom properties:

Set-RDSessionCollectionConfiguration –CollectionName MyCollection -CustomRdpProperty “drivestoredirect:s:C:”

If you are using Windows 7 as client, remember to update “Remote Desktop Client” (mstsc) otherwise selected redirection is not working.


Problem: Set “Start In” folder for Remote App on Windows 2012 R2

Unfortunately is not possible on Windows 2012 R2 Remote Desktop Service App define a StartIn/Working folder. I had a Java Application that require a specified working folder to run without problem.

The workaround is to create a batch and publish this batch instead of application:

Start “%ApplicationName%” /d “%path to startdir%” “%path to executable%”

Then change the icon of published application following this guide:

How to Change Remote App Icon on Windows 2012 R2

Changeing icon on RDS Remote App is possible only from Powershell.

Open administrative Powershell, import RemoteDesktop module and check first the current IconIndex and IconPath settings:

Import-Module RemoteDesktop

Get-RDRemoteApp -alias “MyApp” | fl

Then set the IconPath and IconIndex to the desired value. Found IconIndex counting the icons present on EXE,DLL,ICO until you reach the desired one starting from 0:

Get-RDRemoteApp -Alias “MyApp” | Set-RDRemoteApp -IconPath “C:\MyProg\MyProg.ico” -IconIndex 0

It’s possible also to change directly the .ico file you found on C:\Windows\RemotePackages\CPubFarms\CPubRemoteApps on the broker if you already have the icon on .ico format.