Announcement

Collapse
No announcement yet.

copying registry key

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • copying registry key

    i have powrshell script that find key that contains POP3 server, but i don't know how found the key copying on same location and rename them

    my script is

    $destination= 'hkcu:\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\TEST\9375CFF0413111d3B88A00104B 2A66766\0000000g'

    gci 'hkcu:Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\TEST\9375CFF0413111d3B88A00104B 2A6676' -recurse -ErrorAction SilentlyContinue |
    % { if((get-itemproperty -Path $_.PsPath) -match "POP3 Server") { $_.Name; reg.exe copy $_.Name $destination /s /f} }



    I receive error message

    ERROR: Invalid key name

  • #2
    Have you checked that precise registry key exists?
    Tom Jones
    MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+
    PhD, MSc, FIAP, MIITT
    IT Trainer / Consultant
    Ossian Ltd
    Scotland

    ** Remember to give credit where credit is due and leave reputation points where appropriate **

    Comment


    • #3
      i have in outlook 2010 one account. i want to create in outlook 2010 one more account that is same like previous account with different pop3/smtp settings because i have backup mail server. i thinked that this work do over registry

      Comment


      • #4
        That key won't exist for all users as it is a user key, hkcu is HKEY_CURRENT_USER so the actual key will be different for each user on each PC.

        Wouldn't it be easier to do this as part of the office installation?? run setup.exe /admin and generate a custom installation file which will contain your accounts.
        Last edited by wullieb1; 30th March 2017, 01:39.

        Comment

        Working...
        X