Hey Dan,
I was search ways to edit the registry using vbscript. I came across some examples and decided to create my own script the way I want with the values I want to set. This is what I came up with:
Code: Select all
Const HKEY_CLASSES_ROOT = &H80000000
strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "txtfile\shell\open\command"
strValueName = ""
strValue = "Test Value"
objRegistry.SetStringValue HKEY_CLASSES_ROOT, strKeyPath, strValueName, strValue
After saving as a .vbs script, I run it and nothing happens. Do you know what I did wrong? To test this I changed the value in the HKEY_CLASSES_ROOT\txtfile\shell\open\command\(Default) key and ran the script. Nothing happened
Dan wrote:Hello,
This can be done by using custom actions which backup and restore the registry entry. Please take a look on the
Return orginal registry value if MSI is uninstalled forum thread which debates a similar subject.
You can also take a look on the
Options to integrate and debug custom actions article which may be useful to you.
Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.
Best regards,
Dan
FOLLOW US
Get the latest news in Application Packaging