Hi Guys,
I've said it more than once here, sdelete and notepad are both in the c:\windows\system32 folder.
Look at the 2 screenshots showing each
Running run /n sdelete.exe DOES NOT WORK...
Running run /n notepad.exe WORKS...
Also like Olaf, c:\windows\system32 is not in my PATH either,
Running ?GETENV("Path"), I get...
C:\Program Files (x86)\Embarcadero\Studio\17.0\bin;C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\17.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\17.0\Bpl\Win64;C:\ProgramData\Oracle\Java\javapath;C
Yes Olaf, I am aware of the different version collision possibilities when running 32bit apps on a 64bit machine, but that is not the issue here. I learned that when doing the odbc stuff some time ago.
>> You say you want "a way to execute any executable in any of the possible windows locations
Yes Mike, that is exactly what I was trying to do with mixed results. I actually assumed (wrongly) that files placed in the windows locations would be available and that clearly doesn't work as I have demonstrated.
For a long time now, I have had sdelete.exe in the system32 folder and have used it many times from the dos prompt via the OS. It always ran without error. Then early this week, I added it to the excryption script I'm working on and it would NOT work. So, why was the question? That also got me thinking about ANY other executable that may be in the windows locations. That caused me to stop thinking about just the sdelete issue and focus on a much larger issue of why some exes will run and others will not, and that is where the "ANY" came from.
I've noticed that everyone has been focused on getting sdelete to work by controlling its location and that is acceptable, however, they are missing the bigger issue here. And that is, why won't it work like notepad when it lives in the same place as notepad. And is this sort of unexpected behavior expected?
Thanks,
Stanley