Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. rathgus

    Registry query via variable string and writing a new reg key

    Ahhh... it seems the strSubKey is getting incremented one last time before it leaves the loop. So the value is one higher than I want it. To fix the issue I added: strSubKey = Right("000" & CStr(strSubKey - 1), 4) After Loop and before oReg.SetStringValue HKLM, strKeyPath & strSubKey...
  2. rathgus

    Registry query via variable string and writing a new reg key

    Thanks for all your help guys, I really appreciate it. I checked out the links and started to do more research on loops. I re-did the script and approached with a Do loop: const HKLM = &H80000002 strComputer = "." Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &...
  3. rathgus

    Registry query via variable string and writing a new reg key

    Is it possible the SetStringValue method I'm using won't work? Since the reg string I want to add does not yet exist, would I have to create the reg string, then set it? Thanks.
  4. rathgus

    Registry query via variable string and writing a new reg key

    PHV, I replaced strSubKey1 = strSubKey1 + 1 with strSubKey1 = Right("000" & CStr(strSubKey1 + 1), 4) like you suggested, but it still seems to be stuck in loop. I even replaced the funky string I want to add with "test" to see if it would do that, and nothing, still looping. Do I need to...
  5. rathgus

    Registry query via variable string and writing a new reg key

    Thanks for the responses guys, I'll try that change today and report back. Other than that, does the syntax look correct to you guys? My only other concern is trying to apply the string value "AT+CGDCONT=2,\"IP\",\"wap.cingular\"". I'm using Notepad++ to help me see the code and I don't think...
  6. rathgus

    Registry query via variable string and writing a new reg key

    I apologize in advance for what I'm about to ask. Our dedicated scripter in the office just got laid off and somehow I got tasked with a project involving VBScript, of which I know nothing about. I'll provide screenshots of what I want to ultimately do, to try to help with the verbiage...

Part and Inventory Search

Back
Top