0
新的VBS,基本上符合標準,腳本將編輯註冊表,這是我到目前爲止。VBS沒有調用regedit對象
For Each ObjProcessor In ColSettings
If (ObjProcessor.AddressWidth = 64) Then
If FSO.FileExists("C:\Program Files (x86)\A\A Client\B\SelfService.exe") Then
strkey1 = WshShell.RegRead("HKLM\SOFTWARE\Wow6432Node\A\B\C\STORE0")
If (strkey1 = "AppGateway;https://A.net/C/B/Discovery;On;AppGateway") Then
Set objRegistry = GetObject("winmgmts:\\" & strComputer &"\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Wow6432Node\A\B\C\"
strValueName = "STORE0"
objRegistry.DeleteValue HKEY_LOCAL_MACHINE, strKeyPath, strValueName
Call MsgBox("Test: " & strKeyPath)
End If
End If
End If
Next
因此,只有MsgBox函數工作時,objRegistry.DeleteValue心不是。我之前已經宣佈過objRegistry。不能似乎弄清楚爲什麼
確保登錄用戶具有註冊表項的權限。 –
d0h大聲笑...不能相信我錯過了最基本的東西。欣賞...但是我現在有一個更大的問題。 – Farhan