Run the htascript for another domain with admin credentials

I want to run the hta script from one domain to another domain which is complely different domain. We have network connections established to acces that domain and how to run the script with another credentials and add the runas option.
sivark14Asked:
Who is Participating?
 
sivark14Connect With a Mentor Author Commented:
I tried  this command runas /user:domain\domainadmin "c:\windows\system32\mshta.exe \"h:\test.hta\"" which is working fine.
0
 
Miguel Angel Perez MuñozCommented:
Try this way:  runas /env /user:user@other.domain "WSCRIPT "route to file.vbs""
0
 
Miguel Angel Perez MuñozCommented:
Sorry I read vbscript. Change wscript  and enter the program that runs the script.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
sivark14Author Commented:
The above is not running for hta script.
0
 
NavdeepCommented:
do you have any trust relatioship with that domain, if it's completely separate entity then you won't be able to run otherwise you can right click on the file and select Run As runas
0
 
sivark14Author Commented:
Thanks for the update. I know how to add the runas option thorugh reged but i don't have access to edit the registry on the machine. Some time back I used the command runas /user:'@domain.com "C:\windows\system32\mshta.exe test.hta"" which was working. I forgot the exact command which will give the results.

0
 
Glen KnightCommented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.