Saturday 29 November 2014

Unable to run executable (e.g. a hotfix) - "Windows cannot access the specified device, path, or file...."

 
Issue:
When trying to manually install an executable file (e.g. a hotfix) on a server, the fololowing error pops up:
 
"Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item"
 
 
Cause:
There are various possible causes but in this case the problem was caused by the fact that the hotfix had been downloaded on another computer and then copied onto the server. As such, the server had marked the executable as being unsafe and so blocked any attempt to run it.

Solution:
Right click on the executable and select 'Properties'. From the general tab, click on the 'unblock' option which appears under the security heading.
 
 

Tuesday 11 November 2014

Uninstall an application or program through SCCM or CMD line

Although there are a great many different ways to uninstall an applicaiton or program, one of the most straightforward and customisable options is to use wmic. If you need to quickly uninstall a particular applicaiton or program use the following cmd line:

wmic.exe product where "name like 'Example Program'" call uninstall

It's worth noting that you can also utilise the % if, for example you wish to uninstall all verisons of a given program, e.g.

wmic.exe product where "name like 'Adobe Reader%'" call uninstall

If you need to perform a mass uninstall, simply create an empty package and set the program to run the above command line: