Thursday, March 19, 2015

IniPathLocation

'##############################################
'Getting the Current user registry key value in a variable
On Error Resume Next

strComputer = "."

wbemImpersonationLevelImpersonate = 3
wbemAuthenticationLevelPktPrivacy = 6
Dim strINIPath


Dim objRegistry
Set objRegistry = CreateObject("Wscript.shell")
Set objshell = CreateObject("Wscript.shell")
Set FSO = CreateObject("Scripting.FileSystemObject")


Dim objWshShell : Set objWshShell = CreateObject("WScript.Shell")
'set wshShell = CreateObject("WScript.Shell")

Dim oReg,strHKCU
Dim strKeyParent
Dim ret
Dim strKeyName
Dim arrSubKeys
Dim strAppDataChk
Dim strNotesINI
Dim ConfigIni,ConfigXml
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_USERS = &H80000003

Set WshShell = CreateObject("WScript.Shell")

Set ObjFSO=CreateObject("Scripting.filesyStemObject")

strComputerName = "."

On Error Resume Next
strGUID = WScript.Arguments.Item(0)
strAppDataChk = objWshShell.RegRead("HKEY_USERS\" & strGUID & "\Software\Lotus\Notes\8.0\NotesIniPath")

str1 = "HKEY_LOCAL_MACHINE\SOFTWARE\SID\Current_UName\notesini\path"
WshShell.Regwrite str1 ,strAppDataChk, "REG_SZ"

No comments:

Post a Comment