SHELLEND strangeness

Previous topic - Next topic

MrTAToad

No sure its a bug or not, but I've been trying to use SHELLEND to run an application in a directory (SHELLEND "Update/program.exe"), but it wont execute.
I've also tried moving into the Update directory using SETCURRENTDIR and then running program.exe, but that didn't work either.

The only time it will execute is if the program is in the same directory as the caller program.

Moru

There might be troubles with what is the active directory when you use the shell, try setting the directory first.
See SETCURRENTDIR()

Kitty Hello

He did. Didn't he?

Hatonastick

Two things spring to mind.  Either it's a bug (in GLB or Mr TA Toads code), or it's a 'security feature' of whatever OS this is bring run on.  None of which seems that likely to me.  Is there any limitations put on SHELLEND as far as security goes Gernot?  I'm guessing not otherwise you'd have said so what I just said is a rhetorical question...

Other possibilities include things like security programs that watch what programs are run on your machine and prevent anything executing that they aren't sure of.  I remember something odd that happened on the PC of a friend of mine that was traced back to one of the myriad of security programs he had running to protect against viruses, malware, trojans and the like.  Not talking about Virus Checkers per se...  Sorry brains not functioning so can't think of the proper name.  ;/

MrTAToad

I wouldn't be surprised if its Vista's security features getting in the way.  Saying that, however, doing the same thing with SHELLCMD works...

Hatonastick

Hmm bug with GLB under Vista maybe?  Got any example code that doesn't work on your machine?  I run XP and would be happy to try it and see if it works here.

MrTAToad

#6
I'm using the following :

Code (glbasic) Select
IF SETCURRENTDIR(UPDATE_DIR$)=TRUE
    SHELLEND webDownloadFiles$[1]+" "+tempDir$


UPDATE_DIR$ is the directory to be moved to - in this case Update
WenDownloadFiles$[1] contains the filename (which exists) and tempDir$ contains the current directory

It appears, that batch files, in the current directory are fine - but not executables.  I suspect Vista's UAC mucking around...


Kitty Hello

pack a working bug example together, please.

MrTAToad

#8
Okay - will do!

I've included a small test example.

[attachment deleted by admin]

Kitty Hello

a bat file i no executable: try SHELLEND "cmd.exe /K \"Update\\update.bat\""

You must place the update in the .app dir.