Reputation: 99
Its almost certain that HTA files are obsolete, but i've found that they are much better than net send
/ msg
.
I'm trying to run a HTA file on a remote machine using PSTools, but instead of it running, it brings back a broken window:
Running the HTA file using CMD (locally) works perfectly though.
My PsExec line:
PsExec.exe -accepteula -i -d \\itwall cmd 'mstha \\intranet\Downloads\VisitorSystemNewMessage.hta asd'
I even tried to run the HTA from a Batch file, but the exact same thing happens.
Any ideas?
Upvotes: 0
Views: 1153
Reputation: 1702
It's because the account running the command cannot interact with the session of the remote user.
Use the -s
switch to run the HTA using the system
account of the remote computer.
Also, you shouldn't need to run cmd
. You should be able to just specify mshta.exe
then your arguments.
PsExec.exe -accepteula -s -i -d \\itwall mshta.exe \\intranet\Downloads\VisitorSystemNewMessage.hta asd
Edit: To illustrate that this is not an HTA issue. Run the following command:
PsExec.exe -accepteula -i -d \\itwall notepad.exe
Notice you'll have the same black window showing.
Upvotes: 2