colesy
asked on
HTA Setting File/Folder Permissions and more...
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?
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?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Got it! Completely my fault.. I had another group in the persmissions that wasn't included in the code I posted. It used a variable that wasn't in this script. I had copied this line of code from another script I wrote and didn't notice this. Not sure why I took it out when I posted the code either..
My bad... Thanks for the info.. Points to you for your time. Now I need to try and answer some questions before you do to generate more points for myself lol.
My bad... Thanks for the info.. Points to you for your time. Now I need to try and answer some questions before you do to generate more points for myself lol.
LOL! That's good. Thanks for the grade. I'm sure you'll find plenty of questions to answer...the VBScript is the only zone I keep an eye on, and there's always too many for me to check them all out anyway.
Regards,
Rob.
Regards,
Rob.
ASKER
I ran the command manually and it did work, so not sure what the deal is.. Where do we go from here?