Restart Computer.

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 199
Joined: Tue Aug 05, 2014 10:07 am

Restart Computer.

Post by Googie85 » Fri Feb 05, 2021 9:18 am

Hi Guys!!!!!

I am trying to restart my computer with the following console command: "shutdown /r". How would I go about achieving this?

Many Thanks,

Googie.

mrcoollion
Posts: 719
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Restart Computer.

Post by mrcoollion » Fri Feb 05, 2021 10:29 am

You can use the Shell Command.
https://livecode.fandom.com/wiki/Shell

Or see LC dictionary

Regards,

Paul

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Restart Computer.

Post by bogs » Fri Feb 05, 2021 10:32 am

I'm not sure I understand the question, Googie.

It would be nice to know which OS your using as well, but what do you see when you open the CLI and type in "shutdown /r" ?
Image

mrcoollion
Posts: 719
Joined: Thu Sep 11, 2014 1:49 pm
Location: The Netherlands

Re: Restart Computer.

Post by mrcoollion » Fri Feb 05, 2021 11:26 am

I assumed it is a windows OS because shutdown /r is a typical Windows console command for restarting your PC.
And being on the LiveCode forum I also assumed it needed to be done within a LC Stack.

Probably not to smart of me as assumptions can make an ........
:D :shock:

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: Restart Computer.

Post by bogs » Fri Feb 05, 2021 11:59 am

My initial thoughts as well Paul, however, shutdown works across all 3 desktop OS'es, so it would be nice to know which is being worked with for testing, since the various D'OS'es can vary in how shell works.

I've made an ........... of myself plenty, I wouldn't sweat it too much heh heh.

*Edit - since we're in the 'Windows' section, I think I just did again hahah.
Image

Klaus
Posts: 13806
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Restart Computer.

Post by Klaus » Fri Feb 05, 2021 12:22 pm

As Paul already mentioned, use SHELL:

Code: Select all

...
put shell("shutdown /r") into tDummy
...

Post Reply

Return to “Windows”