I have been trying to get slmgr.vbs to work from autoit but cant seem to get the darn thing to work here is my code $prodkey = "00000-00000-00000-00000-00000" Func _rekey($key) RunWait(@ComSpec & " /c " & "cscript %windir%\system32\slmgr.vbs /ipk " & $key, "", @SW_SHOW) RunWait(@ComSpec & " /c " & "cscript %windir%\system32\slmgr.vbs /ato","",@SW_SHOW) EndFunc _rekey($prodkey) I am sure I have the syntax correct