I create a lot of websites in my environment and would like to use a script to run my setspn commands. I can do it like this however, it defeats the purpose unless I can inject variables with input boxes or arrays.
I would like to place a website and server variable like this but it throws unterminated string constant errors. I've tried several combinations of strings and quotes and I'm stuck.
I know the quotations are wrong but I can't find any examples of variables being used within a comspec statement...can someone point me in the right direction please?
Code:
objShell.Run("%COMSPEC% /k Echo Y| setspn.exe -A http/testsite server1", 1, True)
I would like to place a website and server variable like this but it throws unterminated string constant errors. I've tried several combinations of strings and quotes and I'm stuck.
Code:
objShell.Run("%COMSPEC% /c Echo Y| setspn.exe -A http/" & objWebsite & " " & objServer", 1, True)
I know the quotations are wrong but I can't find any examples of variables being used within a comspec statement...can someone point me in the right direction please?