VMware Cloud Community
poltraf
Enthusiast
Enthusiast
Jump to solution

Sysprep and Win 2012

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

1 Solution

Accepted Solutions
poltraf
Enthusiast
Enthusiast
Jump to solution


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

View solution in original post

0 Kudos
7 Replies
IamTHEvilONE
Immortal
Immortal
Jump to solution

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

)

poltraf
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos
IamTHEvilONE
Immortal
Immortal
Jump to solution

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.

poltraf
Enthusiast
Enthusiast
Jump to solution

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

0 Kudos
IamTHEvilONE
Immortal
Immortal
Jump to solution

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.    

poltraf
Enthusiast
Enthusiast
Jump to solution


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

0 Kudos
poltraf
Enthusiast
Enthusiast
Jump to solution

Great! It works smoothly! Thank you very very much!

Raf

0 Kudos