Skip to content

Commit f1675f9

Browse files
committed
Minor enhancement to smart_migrate
Adding a check to see if the user is currently already migrated to the "explorer.exe" and "winlogon.exe" processes prior to attempting migration.
1 parent 8d1f584 commit f1675f9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/post/windows/manage/smart_migrate.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ def run
2727
server = client.sys.process.open
2828
original_pid = server.pid
2929
print_status("Current server process: #{server.name} (#{server.pid})")
30+
if server.name.casecmp("winlogon.exe") == 0 or server.name.casecmp("explorer.exe") == 0
31+
print_good("Current process is already in #{server.name} process, exiting.")
32+
return
33+
end
34+
3035

3136
uid = client.sys.config.getuid
3237

0 commit comments

Comments
 (0)