i figured it out. I just made a batch file that i point to, and carry the variable over using the %1.
Main Topics
Browse All TopicsHello,
I'm trying to make an hta that will unlock a users account using joeware's unlock tool. It's an EXE that you run in cmd and give it an attribute. "Unlock.exe unlock . username"
I have been able to get it to open a command window, but now put in the unlock.exe unlock . username with the following code
Sub cmdSubmit
Const NORMAL_WINDOW = 1
Set objShell = CreateObject("Shell.Applic
objShell.ShellExecute "cmd.exe", "%userprofile%\appdata\loc
End Sub
Any help would be greatly appreciated. Below is my whole code.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Hi, you could have also changed this:
objShell.ShellExecute "cmd.exe", "%userprofile%\appdata\loc
to this
objShell.Run "cmd.exe /c ""%userprofile%\appdata\lo
as long as document.test.name.value returned the username.
Regards,
Rob.
Business Accounts
Answer for Membership
by: sj_hicksPosted on 2009-04-15 at 17:13:07ID: 24153662
A couple options: l")
1) Run unlock.exe directly, rather than using CMD.exe
2) Use the /C (runs unlock then closes cmd): cmd /c unlock.exe....
3) Use the /K (runs unlock then leaves cmd open): cmd /c unlock.exe....
4) If this doesn't work, use WScript.Shell.Run:
oShell = CreateObject("WScript.Shel
oShell.Run <command line>, 1, true