I have been working on this one for a while and I just can't seem to get it. What am I doing wrong? I could explain what I am trying to do and why I am trying to do it, but in this forum, I am sure you folks get the gist. The problem exists with the spaces in the HKLM entry.
Please - dont ask why, dont ask how, dont recommend another method.. My question is just about my syntax
. Sorry if I come across a bit direct, but sometimes that happens :) Thanks in advance!!
'On Error Resume Next
Set objShell = CreateObject("Shell.Application")
strWinLogon = "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WinLogon"
strRegApp = "C:\WINDOWS\system32\reg.exe"
strArg = "test"
'objshell.shellexecute strRegApp, Chr(34) & strWinLogon & Chr(34) & " /v bb /t REG_SZ /d " & strArg & " /f","", "runas", 1
objShell.ShellExecute "reg.exe", Chr(34) & strWinLogon & Chr(34) & " /v tstval /t REG_SZ /d test", "", "runas", 1