Hey thanks for all your help @Sebastian-Roth. This helps me look into things more.
Today I will try to setup a sandbox VM so I can look into playing around with 1.6.
Thanks again!
Hey thanks for all your help @Sebastian-Roth. This helps me look into things more.
Today I will try to setup a sandbox VM so I can look into playing around with 1.6.
Thanks again!
@Sebastian-Roth said in Repurpose the restart notification to work for running/delaying Snapins:
aggregatedDelayTime
OK. So I am looking at the code now and trying to figure some things out.
I am trying to get a better understanding of what FOGShutdownGUI.exe can do but I am not finding anything in the code that gives me the answers I looking for.
Specifically I am wondering about what options I can pass for “action”: “request”, and “options”: (is “request” the option for action?) Is this documented anywhere?
Thanks!
Hey @Sebastian-Roth I will see what I can do! I am definitely not a developer so it will be slow going while I try to figure things out but I would be happy to try to contribute to FOG.
Thanks so much for your reply @Sebastian-Roth! I will start playing around with this and see what I can come up with.
I am definitely not a developer but I would be happy to help in any way I can. Thanks again.
Here is the scenario I am trying to accomplish:
I would like to find a way that I can push a software update via a Snapin to an employee or group but give the end user the ability to postpone the update if they want. For example, if I pushed out a Zoom update to a user while they were in the middle of a Zoom call it would interrupt their call. It the user could postpone the snapin then it could run after they are off the call.
Here is what I am thinking.
In the “Create new Snapin” page two new options are created:
![0_1585338426908_chrome_WO9cHQWpuq.png](Uploading 100%)
Before the Snapin runs, the notification will pop up. Instead of saying “This computer needs to reboot to apply new software.” the text will be the confirmation message. Instead of having a “Shutdown Now” button, the button will read “Run task now”. The user can then choose to hide the notification and the snapin will run after the time runs down or they can hit the “Run task now” button and the Snapin will run immediately.
![0_1585338465573_AgE0nmOHxf.png](Uploading 100%)
There could even be a message to let the end user know that the computer will reboot after the task is run (if that is an option selected for the snapin).
One of the biggest concerns with running some snapins is interrupting employees while they are doing an important task. This would give the end user more flexibility.
On a similar note, is there any way to do something like this right now? Is there a way to call the notification via a Powershell script through a snapin?
Thanks!
Thanks for your response @Daniel-Miller! It looks like I overlooked this plugin; it seems to be generally what I am looking for. There definitely seems to be issues related to provisioning with plugins (as has already been mentioned in the link you shared). Currently I can either have the printers auto-add using the persistent group and have snapins not run (which essentially breaks the provisioning process) or I can have Snapins run but not use the persistent group.
I have run at least a test or two where I think I got both to work but it may have been a fluke as I can’t really replicate that. I will keep plugging along.
Thanks for pointing me in the right direction!
I am not sure if I am missing something or if the functionality is just not there but I don’t see any way to add printers to a host during the host provisioning process. I know that I can add printers to a group then add those printers to all the hosts in the group but printers only get added when I do that manually and not during the host provisioning.
Is there any way that I can configure FOG so that when I register and provision the host I can add the printers without having to manually go into the FOG dashboard and adding printers to the host? Has anyone done this with a plugin or snapin?
@Sebastian-Roth I think that was it! I thought the drivers were installed but it looks like HP is weird… generic HP drivers apparently don’t work (that is what I had installed) but if I install their bloatware driver pack all of the printers start showing up.
You are my hero.
Thanks again so much for helping me out with this. I am happy that I have been able to narrow it down.
Sorry for all the time you spend helping me troubleshoot when the solution ended up being something so basic but I really appreciate your help with this.
So I have been experimenting with different things. I have not figured out anything conclusive but have make some interesting observations:
I know that is probably not much help. I am not sure what more to try. It looks like there is some info that FOG is just not adding to the computer, FOG will only add a printer if the printer has already been manually added. Hope this made sense.
Thanks @Sebastian-Roth
Both printer IP addresses are showing up in “Ports” when I check in Print Manager.
I ran the cmd you gave me and it didn’t spit out any error. After a computer restart the printer is still is not listed. Thanks again for your help. I will try manually adding a printer again and check out the settings in Print Manager and see if I can figure out something that might be missing. Please let me know if there is anything that you can think of that I should be looking out for.
I made the change you suggested:
Here is what shows up in the log:
------------------------------------------------------------------------------
--------------------------------PrinterManager--------------------------------
------------------------------------------------------------------------------
12/27/2019 9:37 AM Client-Info Client Version: 0.11.16
12/27/2019 9:37 AM Client-Info Client OS: Windows
12/27/2019 9:37 AM Client-Info Server Version: 1.5.5
12/27/2019 9:37 AM Middleware::Response Success
12/27/2019 9:37 AM PrinterManager Adding printers
12/27/2019 9:37 AM Printer Adding: RP 2 F Printer Test
12/27/2019 9:37 AM PrinterManager PrintUI return code = 0
12/27/2019 9:37 AM Printer Adding: SOJO 2F Printer
12/27/2019 9:37 AM PrinterManager PrintUI return code = 0
12/27/2019 9:37 AM PrinterManager Restarting spooler
------------------------------------------------------------------------------
Then later:
------------------------------------------------------------------------------
--------------------------------PrinterManager--------------------------------
------------------------------------------------------------------------------
12/27/2019 9:39 AM Client-Info Client Version: 0.11.16
12/27/2019 9:39 AM Client-Info Client OS: Windows
12/27/2019 9:39 AM Client-Info Server Version: 1.5.5
12/27/2019 9:39 AM Middleware::Response Success
12/27/2019 9:39 AM PrinterManager Adding printers
12/27/2019 9:39 AM PrinterManager RP 2 F Printer Test has already been configured
12/27/2019 9:39 AM PrinterManager SOJO 2F Printer has already been configured
------------------------------------------------------------------------------
Printers however are still not showing up in “Print Management” or “Printers & Scanners”
Did I make the change correctly? Thanks for continuing to help me out with this.
@Sebastian-Roth - I have run printmanagement.msc
and there is no indication that a new printer was added there.
I stopped the FOGService and manually added a printer. It added just fine.
Are there any logs or screenshots that I could send that would be useful for troubleshooting? Thanks!
OK. So something else that I have observed.
I changed “Select management level for this host” from “FOG Managed Printers” to “Only Assigned Printers” and it indeed did remove the printers that were there but the printers that have been supposedly added are still not showing up (even after a reboot).
Here is a screenshot:
Thanks for your answers @Sebastian-Roth and @Tom-Elliott. I have followed your suggestions:
Reboot the computer (no difference)
Manually restart Print Spooler (no difference)
Reboot the computer after restarting the Pring Spooler (still no difference)
The log is still saying: “xxx has already been configured”
I have tried this with two different printer on two different computers and no matter what I do it looks like (according to the log) the printer is added but does not show up in Windows.
Any other ideas?
In the mean time I will try manually adding some printers and see if there are any issues when I manually add printers.
I have been trough all the documentation for adding a printer and feel like I did it correctly but the printer is still not showing up on the end user’s machine.
Here are the steps I did to add the printer:
I used the software to find the info from the printer on my computer.
Then I added this to FOG. So far so good.
After that I added the printer to my host computer.
When I look at the log on my host machine, the log states that the printer has been added:
When I look at more of the log it states that the printer is already configured:
When I look at the printers added to Windows however it does not show up.
Any thoughts on why the printer I added is not showing up?
Thanks!
Hey @Daniel-Miller and @george1421 thanks again for your effort in helping me figure this out. I think the complexity (for me) for what I was about to do scared me into thinking of a roundabout approach to solving this issue. I think I found a better solution than what I was originally trying to do (and WAY simpler). I will post here in case this will be of use for anyone in the future.
Rather than appending a date to the hostname so I can change the computer name I decided to start out with the date appended to the hostname so that renaming the computer would be exactly how I want it to be then for my other requirements (adding the user to be admin of the computer) I simply removed the date from the hostname to come up with the username.
Basically, if my username is bobsmith and today’s date is 2019-12-06, I will name the host: bobsmith191206
then in my Powershell script I just need to set $userName = $env:computername -replace '[0-9]'
then the hostname remains bobsmith191206
and now I have a variable $userName
that now equals BOBSMITH
Anyhow, that is one of those… so easy it is dumb solutions. Not sure why I didn’t think of it earlier. Thanks again you guys for helping me to think outside of the box I stuck myself in.
Hey @george1421 thanks for your active involvement here and for your link! It looks promising. I will see what I can figure out.
Thanks guys for your responses. I was planning on disabling FOG from managing the host name after I figured out a way to get the variables I need to pass in my SnapIn file. @george1421 I already have an unattend.xml file running so the initial naming of the computer is not a huge concern for me; just the naming of the computer after the fact.
The links and examples you guys responded with I think help a bit but are beyond the scope of my current capabilities (which is fine… guess it is time to learn something new); hopefully I can use that info to get started. (As should be obvious at this point, I am not at all a developer; just trying to figure out what I can)
Thanks again!
I don’t know the best way to phase this in a question so I will try my best to describe my end goal.
I am trying to establish a provisioning process so that during full host registration I can enter the Active Directory username then later on in the provisioning process FOG will (either via a SnapIn or Sysprep Powershell script) use the username to do the following:
$username
+ append a date to that name. Example Computername = username191206 (today’s date) or $computerName = "${username}${Date}"
NET LOCALGROUP administrators ${DOMAIN_NAME}\${username} /add
Currently during full host registration I can use the host name for my username then after FOG changes the computer name to equal the host name, I can use $env:computername
as the variable for my username in my SnapIn or Powershell script. The biggest problem with that is I don’t see any way to append a date to the computer name without FOG changing the computer name back after a computer reset.
What would be preferable to me is if I could use the “primary user” or “tag #1” or “tag #2” I set during host registration and pass that as the $username
variable. I just don’t see any way to do that. Is this possible? Does what I am trying to do make sense?
Thanks in advance for any help or knowledge you can provide.
Thanks again for your help. I will research more what the System User can do. It looks like I am out of luck to do things that require elevated permissions (such as enabling Bitlocker) using a SnapIn. I think I will start to evaluate other ways to do post-provisioning scripts/tasks.