Hi,
I'm preparing templates to put in catalog for our customers. The tepmlate includes the command slmgr.vbs /skms xx.xx.xx.xx to point to our KMS server.
Since most of them ask how to activate windows, and they usually want to activate Win as soon as possible, I decided to create a very simple batch, let's say, activate_windows.bat, with inside a simply "slmgr.vbs /ato".
The problem I'm encoutering now is that after deploy of template (sysprep), this file that I put on desktop (the simpliest place for customers to find it) disappears.
I know, this is the normal behaviour but... how could I prevent it to delete the bat file?
Thank you
BR
Raf
Thank you... As soon as at office on monday I'll try. I'm sure it will work 🙂 And Iìll close the post.
Thanks again
we execute the "generalize" command, and reseal the os for the out of box experience. therefore the local admin account will be replaced.
what you could do ... is write a post customization script to execute those commands instead of leaving them with one on the desktop.
that way, the windows system would be activated by the time the users even gets to it.
@echo off
if "%1%" == "precustomization" (
) else if "%1%" == "postcustomization" (
---- right here you might want to run a ping test to the DNS/IP of your KMS system to ensure you don't try and register when the system is not reachable
cscript \windows\system32\slmgr.vbs -skms ...
cscript \windows\system32\slmgr.vbs -ato
)
Yep, this is exactly what I needed...
So, should I put these strings in the vCloud Director VM's Properties -> guest os customization -> customization scripts, just before templating it? And... directly, line by line, or creating a file containing them, and to be lauched from the window above?
Thank you for support!
Raf
fill in the blanks and put it directly there.
that way you don't leave a file on the system with your KMS server address.
Great! Just... last thing... I'm not so experienced in programming... how could I insert the condition "if ping to xx.xx.xx.xx is successful, then go ahed, else retry until it will be successful"?
Thanks a lot
Raf
try it without the check first. if that works for you, then you should be fine.
I was just trying to be fancy by ensuring you can ping the KMS server first before attempting to license the OS.
Thank you... As soon as at office on monday I'll try. I'm sure it will work 🙂 And Iìll close the post.
Thanks again
Great! It works smoothly! Thank you very very much!
Raf