【问题标题】:Copying User Profile to Default Profile in Windows 7在 Windows 7 中将用户配置文件复制到默认配置文件
【发布时间】:2012-08-11 19:22:08
【问题描述】:

我正在尝试找到一种方法,希望使用批处理文件将修改后的用户配置文件复制到默认用户配置文件,以便任何登录到计算机的用户都将采用配置文件设置。我们使用名为 pGina 的实用程序来调用通过 RADIUS 服务器登录的用户的默认配置文件,而不是让用户直接登录到域。目前,我们正在尝试为此使用 robocopy。

cd C:\Users\
rmdir Default /s /q
robocopy /COPY:DAT /R:5 /E C:\Users\user1 C:\Users\Default
pause

有人知道如何成功复制个人资料吗?提前致谢。

【问题讨论】:

    标签: windows windows-7 batch-file profile robocopy


    【解决方案1】:

    这就是我found 在搜索您的问题的答案时的内容

    rem delete old Default User profile
    RD /s /q "%systemdrive%\Profiles\Default User"
    
    rem copy current user profile to default user profile
    xcopy "%USERPROFILE%\*.*" "%systemdrive%\Profiles\Default User" /e /c /I /H /R /K /Y 
    rem delete non-need some files 
    del /f /q "%systemdrive%\Profiles\Default User\*.*" 
    rem set default attributes
    attrib +h "%systemdrive%\Profiles\Default User"
    
    rem registry trick
    rem no directly copy locked ntuser.dat file
    rem use reg tools to save current user registry to file
    reg save HKCU "%systemdrive%\Profiles\Default User\ntuser.dat"
    rem set default attributes to hive file  
    attrib +H +S "%systemdrive%\Profiles\Default User\ntuser.dat"
    

    【讨论】:

      猜你喜欢
      • 2013-02-07
      • 1970-01-01
      • 2021-02-01
      • 1970-01-01
      • 2021-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-17
      相关资源
      最近更新 更多