1

I'm looking for some help with this script.

We want to setup a script to be able to write the right domain in sccm (domain A or domain B).

The problem with this script is if we click on OK or dont write the domain it continues and dont have the alert Wrong Domain Name....

There's a kind person to check the script and have an idea what I have to correct.

I add also if I write something wrong the script works well and ask to put the right value.. it's only when I dont put any value at the first pop-up.

set env = CreateObject("Microsoft.SMS.TSEnvironment")


Name = inputbox("Enter the Domain Name DomainA or DomainB" ,"Prompt for Domain Name:",env("OSDDomainName"),400,0)
env("OSDDomainName") = Name

if  env("OSDDomainName") = "DomainA" Or env("OSDDomainName") = "DomainB" then
  wscript.Quit
else 

  do

    Name = inputbox ("Wrong Domain Name try with EXACTLY DomainA or DomainB" ,"Prompt for Domain Name:",env("OSDDomainName"),400,0)

    env("OSDDomainName") = Name
  loop until env("OSDDomainName") = "DomainA" Or env("OSDDomainName") = "DomainB" 

 end if 
user692942
  • 16,398
  • 7
  • 76
  • 175
Sergio
  • 19
  • 2

0 Answers0