Page 1 of 1

Run and Execute and MS-DOS

Posted: Fri Oct 27, 2023 11:36 am
by Juan Carlos
I have this problem and doubt how i can run or execute the MS-DOS commnads even Linux commands like shutdown when the Hollywood instructions Run and Execute call to exe programs like the example: Run("C:\\Program Files (x86)\\Hollywood\\ide.exe", "")
the DOS commands in Windows and Linux work or different way to Amiga where call shutdown works fine but on Windos, in this case is necessary an extra parameter like that: Run("C:\\shutdown \s", "") the problem is that Hollywood doesn't recognize the extra paramater: \s
is there a possible solution or it is impossible?
Thank you for the answers.

Re: Run and Execute and MS-DOS

Posted: Fri Oct 27, 2023 1:21 pm
by Flinx
From the manual:
Run(file$[, args$, t])
This function executes the program specified by file$ asynchronously and passes the arguments specified in args$ to it.
So you should try

Code: Select all

Run("C:\\Windows\\System32\\shutdown.exe","/s")

Re: Run and Execute and MS-DOS

Posted: Fri Oct 27, 2023 4:23 pm
by Juan Carlos
I think that shutdown on Windos was a .com program instead of .exe, the console shell isn't very clear, the Linux version, will be different too, thanks, for this solution to my doubt.

Re: Run and Execute and MS-DOS

Posted: Sat Oct 28, 2023 8:43 am
by Dave
This will give you a prompt which shuts down windows. Other switches are available.

Code: Select all

Local Quit = "C:\\Windows\\System32\\shutdown /s"

Run(Quit)