Page 1 of 2

[SOLVED] WADS - Install WAPT agent - post install script

Published: May 18, 2022 - 5:47 PM
by smandel
Hello,

when deploying WADS on a physical PC, the WAPT agent fails to install, even though it's checked in the deployment configuration, and it doesn't execute the post-installation script.
However, I have no problem when I perform this operation with a VM on an ESX host...
it doesn't seem to be a driver issue, as no drivers are missing in Device Manager...

I'm having trouble understanding this...

Re: WADS - Install WAPT agent - post install script

Published: May 18, 2022 - 10:05 PM
by sfonteneau
It's strange that it works in a VM but not on a real PC.

The concept of the post-install script is very simple; it's based on this:
https://docs.microsoft.com/en-us/window ... windows-11.

Furthermore, the network doesn't need to be up for Wapt to install since the Windows image already contains waptagent.exe and waptsetup.exe.

You can verify that your script is indeed located in c:\windows\setup\scripts\Setupcomplete.cmd on the deployed machine at the end of the installation. You can even run it yourself to see what's wrong.

Re: WADS - Install WAPT agent - post install script

Published: May 19, 2022 - 08:58
by t.heroult
Thanks for the link, Simon, this MS article is super interesting!

Re: WADS - Install WAPT agent - post install script

Published: May 19, 2022 - 09:20
by smandel
sfonteneau wrote: May 18, 2022 - 10:05 PM It's strange that it works in a VM but not on a real PC

. The concept of the post-install script is very simple; it's based on this:
https://docs.microsoft.com/en-us/window ... windows-11

Furthermore, the network doesn't need to be up for Wapt to install since the Windows image already has waptagent.exe and waptsetup.exe.

You can verify that your script is indeed located in c:\windows\setup\scripts\Setupcomplete.cmd on the deployed machine at the end of the installation. You can even run it yourself to see what's wrong.
Ah yes, I also used that method with my sysprep!
I'll take a look and keep you posted.

Re: WADS - Install WAPT agent - post install script

Published: May 19, 2022 - 1:52 PM
by smandel
So, no problem when manually running the script after deployment...
I'll try again with a standard response file imported from the WAPT templates

Re: WADS - Install WAPT agent - post install script

Published: May 19, 2022 - 3:00 PM
by smandel
Yes, that's right.
It was coming from my answer file...
But then why does my answer file work for a VM and not a desktop computer? :shock:

Re: WADS - Install WAPT agent - post install script

Published: May 19, 2022 - 3:20 PM
by smandel
According to Microsoft:

%Windir%\Setup\Scripts\SetupComplete.cmd: this script runs with local system permissions and starts immediately after the user sees the desktop.

So apparently, an autologon is needed...
But that still doesn't explain the difference between my VM and a physical machine....

Re: WADS - Install WAPT agent - post install script

Published: May 20, 2022 - 09:31
by sfonteneau
Here, I don't need the session to open for the script to work, so that's strange.

Could you send your answer file so we can see what the problem is?

I admit I don't understand the difference between a VM and a physical PC in the tests.

Re: WADS - Install WAPT agent - post install script

Published: May 20, 2022 - 10:30 AM
by smandel
Hi Simon,

so I think I've figured out why...
In my answer file, I removed the ProductKey provided by the template and enabled automatic activation.
As a result, on a physical PC, it activates the UEFI OEM license, but on my VM, Windows doesn't activate because there's no valid license.
So, from what I understand, SetupComplete only runs on an unactivated Windows 10...

Re: WADS - Install WAPT agent - post install script

Published: May 20, 2022 - 10:51
by sfonteneau
Hmm, during our tests here our Windows systems weren't activated and it worked