Welcome! Log In Create A New Profile

Advanced

iSEC

Posted by Ashury 
Ashury
iSEC
September 10, 2008 09:31AM
Hello of all,

Can I execute the following WinDev command under Windows XP:
ShellExecute("Dir", "C:\Refrence\samp.txt > C:\temp\samp_lx.txt")

Thanks,


Jimbo
ShellExecute(..) vs. SHELL commands
September 11, 2008 06:49AM
Hi, imho ShellExecute() is used to open a program by its extension - which should correspond to to a certain piece of, uh, software on the user's computer. E.g.: ShellExecute("\Users\MyName\MyLetter.doc") will start the application which is linked to .doc files and open the referenced document. This could be Word (Microsoft Office) or Write (Open Office). Depends on your computer ..

Your misunderstanding seems to stem from the SHELL command of some other (DOS?) programming languages, which is used there to call the console (XP, Vista: cmd.exe) and automatically execute console commands.

<b>This will not work on Vista anymore! Neither users with admin rights nor ordinary users are allowed to execute a SHELL command !</b>

What you can safely do: Programmatically fWrite(..) a batch file (e.g. mycopy.bat) to a 'safe' directory (\Users\.. or \Benutzer in German) and after that execute this batch file by use of the ExeRun(..) command.

Please, read the Help of WinDev !

Kind regards
Guenter
Ashury
Re: iSEC
September 11, 2008 12:22PM
Hi Günter,
Thanks,
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: