This script is useful if you want to replace a certain string only in files with a specific extension. In this tutorial we will replace a string “Replace Me” with “This is replaced” only in files that have the “.txt” and “.csv” extensions, and another string “Hello” with “Bye” in […]
Blog
Haven’t used this in a while, but i’ve stumbled across an exe installer that requires reboot, and after reboot it continues the installation of some user MSI. However, during reboot the MSI installation would fail. The MSI was afterwards deleted. So how can i make a log to see […]
For a while i had some issues in a infrastructure of many users installing per-user MSI’s. Problem is, when the same application is packaged and deployed in the infrastructure, this is done to be a per-machine installation and, it doesn’t update/remove the per-user MSI because you are executing the […]
I’ve encountered some applications that, during installation, change the default printer for the users on the machine, regardless if it’s installed from an admin account or system account. To prevent this, you might want to look into the MSI custom actions, but if you don’t have that option, then […]
There might be cases when multiple applications modify the same extension. With these simple scripts you can do a backup and restore of the registry in your MSI. First, create a vbscript for backup: This script creates a folder named “MyApp” in C:\Windows\Installer. By using the […]
Let’s assume that you have a big vendor MSI with lots of features and components. You apply a transform to it according to the specifications sent by the customer. So far so good. But how do you test if everything is installed accordingly? Microsoft offers a VBScript called WiLstPrd.vbs which is […]
Let’s say, for example, that you have a file with multiple lines in the form of: And let’s say you have a variable in the form of: What if you want to add only MyText4 and MyText5 into the file? The solution is simple, we […]
I’ve come across some interesting scenarios during the years. One of them is that some clients want to retain the auto-update capabilities of a package. But in this case, you end up with a problem during uninstall because the Product Code of the main package, will be replaced during […]
Being a former web developer and working with some scripting languages during the years, i must say that Powershell makes it so easy to work with dates. Let’s see some code and tips&tricks for time and dates in Powershell. Get current date This returns the date in the […]
Task Scheduler is a powerful tool. Google, for example, with Chrome, uses it as an update checker once every few hours. If you have Chrome installed you can open up Task Scheduler and see that you have two schedules in it. You can use it in other scenarios, like […]
Let’s say you want to inform your users about something, but you need to know what they pressed, you need to have custom buttons, with tooltips, messages, sounds and so on. Fear not, you can achieve all of this with Powershell. As you can see, we have […]
As you probably know, starting with Windows 10, the Start Menu has been redesigned. How does that translate to shortcuts? The first thing you will see is that you have a lot less folders inside the start menu, meaning that if you have an application with a folder structure like: […]