Skip to content

Commit

Permalink
Update MgmtPointWmi.cs
Browse files Browse the repository at this point in the history
Update exec to hide the new application from the console by default
  • Loading branch information
Mayyhem authored Jul 27, 2023
1 parent f18d7fa commit d2dd01f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/MgmtPointWmi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public static void Exec(ManagementScope wmiConnection, string collectionId = nul
string newApplicationName = $"Application_{Guid.NewGuid()}";
string newDeploymentName = $"{newApplicationName}_{(string)collection["CollectionID"]}_Install";
applicationPath = !string.IsNullOrEmpty(relayServer) ? $"\\\\{relayServer}\\C$" : applicationPath;
NewApplication(wmiConnection, newApplicationName, applicationPath, runAsUser, true);
// Hide from ConfigMgr Console by default
NewApplication(wmiConnection, newApplicationName, applicationPath, runAsUser, false);
NewDeployment(wmiConnection, newApplicationName, null, (string)collection["CollectionID"]);
Console.WriteLine("[+] Waiting for new deployment to become available...");
bool deploymentAvailable = false;
Expand Down

0 comments on commit d2dd01f

Please sign in to comment.