Software (ERASER) remote deployment (.exe, .msi), registry updates, files update...


I tried software installation script without success, and even start to learn powershell because I doubt I will succeed.
Therefore, if you want to create the working script for me, I would be glad to learn in the same time how it works !

Here is my need: I would like to deploy software “ERASER” (the program to securely erase files like usb key stored files) silently on remote computers.


  1. ERASER comes only with a .exe package, containing in fact 2 MSI (32 & 64) + another .exe (MS.NET 4.0)

  2. as it needs admin rights to be launched, after install Windows registry needs to be modified to remove 2 entries, using this .reg:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
    “C:\Program Files\Eraser\Eraser.exe”=-
    [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
    “C:\Program Files\Eraser\Eraser.exe”=-
    maybe this one can help…

  3. after install, I don’t want my users to have the icon on the desktop… C:\Users\Public\Desktop\Eraser.lnk

PS: I already uploaded on a Web server the 32 bit .msi to install, so you can consider that I have a url with the .msi to install.

I also modified the .NET 3.5 script to check for 4.0 version and install it… seems to work.

Hi @rbo

We will combine and provide a single script to perform above operations. I will let you know when completed.


Hi @rbo

I have tried with the script to automate your tasks mentioned,

Here is my need: I would like to deploy software “ERASER” (the program to securely erase files like usb key stored files) silently on remote computers.

We have faced below issue during silent deployment of “ERASER”

The Silent installation of the Eraser software has been failed and also the eraser software automatically start installing the .Net framework even though it is being available already.

We have tried following combination of silent commands but unable to get it right.


We can have complete script once this part cleared.

Condition 1 : If the machine already has the particular .net framework 4.
Result Obtained:
1.The installation progress bar displaying with an error message “Same or higher version of .NET framework 4 has been installed on this computer”
2. If you hit the button close button in the .net framework progress bar, the Eraser software installation started with UI interaction and it continues to wait for technician interaction to the next step

Condition 2 : If the machine does not have the .net framework 4,
Result obtained:
The .net framework installation has been started with UI interactions and it continues to wait for technician interaction to the next step.

Let us know your feedback on this. Also, guide us if you have a way to silent deployment of this application without these errors.

Sample screenshot


thank you,
What is working is to use directly the .msi, not the .exe, but it means that we need to upload the .msi somewhere.

Other alternative would be from my point of view to build a script that would download the .exe, unpack it, detect which version of the OS is installed (32 or 64), launch the installation of .net 4 using Microsoft commands (not the package coming with the eraser.exe), then, silently (using msi functions of the 32 or 64 bit package) install the eraser, remove the registry key and desktop icon.

HI @rbo

We will analyze and update you soon.

Hi @rbo

Please refer attached script for your request. I have also shared details in private message.

Script function as below,

  1. Download Eraser
  2. install .net if not available in the machine
  3. install Eraser silently
  4. Remove specified registry values from HKLM as well as HKCU
  5. Remove Eraser from device start menu


20170412-Automate-Eraser-installation.json (6.28 KB)


Working 90 % :slight_smile:

the only lasting problem is with the .net 4
script don’t work.

maybe some script to install silently can help

I’ve also contacted DEV team of ERASER to get an official public Internet url of the package instead of using my company website :slight_smile:

Hi @rbo,

Thank you for the update. :slight_smile:

We will analyze the issue and let you know the updated script soon.

Hi @rbo

The script will install .net 3.5 using built-in .net downloading commands based on the operating system version. it will not install .net 4 : (

We have observed problem in PowerShell script that few built-in functions varies and does not support lower windows versions.

Is this ok for you if we download and install .net 4.0 from the link ? if so, please confirm below silent command whether it is successfully installing .net 4.0 in your machine or not.

dotNetFx40_Full_x86_x64.exe /q

I will update .net 4 installations part in the script based on your feedback : )

Hi @rbo

We did not hear back from you.

I have changed the script to download and install .net 4 from below link and left rest of the function as before


Please refer update procedure in the attachment and share your feedback.


20170430-Automate-eraser-setup.json (4.79 KB)

Do you know what would be awesome? Is if we could run procedures like this one, but with variables that we could fill in on a “Run Procedures” form on ITSM, and the script can just place $1 $2 $3 $4 etc in where the variables in the execution form are. That way we can use a script like this for dynamically installing things (or removing them, or killing a process, or…) Or even better, a remote system shell option like the old RMM tool has. I do use the old RMM tool sometimes for these reasons, though I understand it’s being phased out; this will be one of the features I miss the most (that, and process explorer).

Hi @indieserve

Thank you for your feedback. I will forward your request to concern team.


Tested the new procedure,
working at 99%
only the application shortcut stayed on the desktop ;-(

Hi @rbo

Yes, it will stay there for sometimes. But if you try to open the application using that shortcut, it will be removed or inform you about shortcut removal.

Let me know your feedback


:cool: COOL :cool:

Working to the perfection !
Deployed on 2 nomad devices without user complaining :wink:

Big Thanks for the Help,
Note that I will communicate you FINAL URLS for the software package instead of those given and present in the script,
certainly next week, the developer having answered my request and having no time this week to help.

Logs are great also.

2017/05/03 12:15:15 PM
Finished success


The operation completed successfully.  
The operation completed successfully.  
Cleared selected registry  for Eraser

Cleared shortcut links
Removed downloaded eraser package from the endpoint
Removed downloaded dotnet package from the endpoint

Hello @rbo

Great to hear that it`s working perfectly for you.


Hi @rbo

Thanks for your feedback :slight_smile:

We will update urls once shared.


finally not,
still need to have admin rights on the computer to launch the program even with the registry keys removed.

I need to investigate.

I found something,
the “user key” registry was still present, (in the “HKEY_USERS” registry hive)

[HKEY_USERS\S-1-5-21-12345678-12345678-12345678-1001\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
C:\\Program Files\\Eraser\\Eraser.exe"="~ RUNASADMIN"

I’ve seen it only by doing a search with an admin account, not seen with the user (maybe because I needed to logoff/login to have the registry editor refreshing…)

I launched the registry part of the script as a user and then it worked.

Script don’t work entirely,
as it needs to remove registry setting for all users, not the “current user” as it will be the “system” user… as we launch the script with “system” account…

I don’t know maybe you can do a loop to remove registry for each user accounts present in the registry ?

script part with registry only to launch “as user”:

import os
import ctypes

class disable_file_system_redirection:
    _disable = ctypes.windll.kernel32.Wow64DisableWow64FsRedirection
    _revert = ctypes.windll.kernel32.Wow64RevertWow64FsRedirection
    def __enter__(self):
        self.old_value = ctypes.c_long()
        self.success = self._disable(ctypes.byref(self.old_value))
    def __exit__(self, type, value, traceback):
        if self.success:

print os.popen('reg.exe delete "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v  "C:\Program Files\Eraser\Eraser.exe"  /f').read()
print "Cleared selected registry  for Eraser"       

Hi rbo,

Thank you for your feedback

we have researched in the registry, but the sub key “Layers” is not available in the following registry path

“[HKEY_USERS\S-1-5-21-12345678-12345678-12345678-1001\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]”

I have tried with the administrator account as well as in the non-administrator.