Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Run dirquota.exe With HTA

Status
Not open for further replies.

djtech2k

MIS
Jul 24, 2003
1,097
US
Very strange....

With Server 2008, I have a friend trying to use an HTA to do some disk stuff. When the HTA is fired off, it says it cannot find the dirquota.exe. The HTA is doing a "Shell.Exec" to call c:\windows\system32\dirquota.exe. The path and everything is fine. Its this file that wont work. It DOES work as a vbscript. So the file is there and it works, however, the mshta engine cannot find it.

Any ideas?
 
What does the command line look exactly?

What if you tried changing the working directory before attempting to run the command? i.e.

objShell.CurrentDirectory = "C:\Windows\system32"
'exec code

--------------------------------------------------------------------------------
dm4ever
My philosophy: K.I.S.S - Keep It Simple Stupid
 
Here is part of it:

Code:
Set WshShell = CreateObject("WScript.Shell")

Set oExec = WshShell.Exec("dirquota quota list")

He is using exec because he needs to read the stdout and process with that after this runs. I have tried spplitting the command into separate pieces, tried Application.Shell, tried runas, and other things. One way or another, it wont work. As it stands there, it says it cannot find file, even if you put in the whole path to the exe. However, as a vbs it runs.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top