I am new to HTA, but failrly good with vbscript. I wrote a script that checks our employee record system against our active directory with employee id and any that don't exist in AD get created and put into a NEW USER ACCOUNTS OU in AD.
They stay there until the user signs the acceptable user policy asking for an account to be created. The helpdesk then has to do a couple steps to complete the process. Enable the account, move the user to the proper OU, create the users home directory (the home directory field is filled out, just not created on the server) and possibly create the exchange email accout would be a bonus.
I have a basic HTA right now where a user can input an employee ID and it enables the user account, and creates the home directory, but my line that sets the file permissions isn't working.
intRunError = objShell.Run("%COMSPEC% /c Echo Y| cacls " & HOMEDIRECTORY & " /t /c /g Administrators:f " & UID & ":F ""ALCDSB\Computer Technician"":F " , 2, True)
I know some of the Shell commands don't work like echo, sleep, quit, but I thought the rest did as long as you load the wscript.shell.
Also, would it be possible for me to create the users exchage email account within the HTA or no?