vbscript custom action
Hi,
This appears to be the "Set objShell= CreateObject("Wscript.Shell")" line.
Any help would be appreciated
Thanks
Option Explicit
Dim strPath
Dim objshell
Dim iwordwrap
strPath="HKCU\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{601ED020-FB6C-11D3-87D8-0050DA59922B}\Flags"
Set objSHell=CreateObject("WScript.Shell")
iWordWrap = objShell.RegRead(strPath)
objShell.RegWrite strPath, 1, "REG_DWORD"
This appears to be the "Set objShell= CreateObject("Wscript.Shell")" line.
Any help would be appreciated
Thanks
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
McRip
15 years ago
Here is all you need for creating the key, writing a string value anda dword value via vbscript.
Just modifiy the path you need...
Cheers
Just modifiy the path you need...
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const HKEY_CURRENT_CONFIG = &H80000005
Const HKEY_DYN_DATA = &H80000006
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Test"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SOFTWARE\Test"
strValueName = "This is a Test"
strValue = "testfolder"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Testing"
dwValue = 82
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
Cheers
Posted by:
anonymous_9363
15 years ago
Posted by:
kiptek
15 years ago
Posted by:
Secondlaw
15 years ago
I think I have a good reason for this but I could be mistaken...
Once my software is installed, I open IE and the addin is enabled. 0 typically means off and 1 typically means on. However, with addins it's opposite... 1 is off and 0 is on. Go figure. So, I have used the registry table to give this value a 1. Now my script is working and the BHO is no longer an option in the IE addins section. The only issue I'm having is with this damned .dll being held hostage as you can see in my other thread... (Probably should have just added that stuff to this thread.)
That being said, this portion of the script is now working flawlessly.
Once my software is installed, I open IE and the addin is enabled. 0 typically means off and 1 typically means on. However, with addins it's opposite... 1 is off and 0 is on. Go figure. So, I have used the registry table to give this value a 1. Now my script is working and the BHO is no longer an option in the IE addins section. The only issue I'm having is with this damned .dll being held hostage as you can see in my other thread... (Probably should have just added that stuff to this thread.)
That being said, this portion of the script is now working flawlessly.
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.