Right Click Option to Restart PC

(imported topic written by SystemAdmin)

I created a right click command to restart a PC, but it doesn’t work after the command window remembers a UNC.

Here is my command.

"cmd.exe /K shutdown -r -f -m " & ( value of property result whose (name of property of it = “Computer Name” ) of current computer )

This command works after I have restarted my PC, but after referencing a UNC path in a command window, it stops working, and I get the following result.

‘\plkfbfx01v\d$\CustomSource’

CMD.EXE was started with the above path as the current directory.

UNC paths are not supported. Defaulting to Windows directory.

Release 2.0 written by A. Blatzheim 1993 at Microsoft GmbH

Usage: SHUTDOWN [/?]

\Computer

[/L] [/A] [/R] [/T:xx] [/Y] [/C]

/? Shows this screen.

\Computer Specifies a remote computer to shutdown.

/L Specifies a local shutdown.

/A Abortes a systemshutdown. This is only possible during the

timeout period.If this switch is used, all other are ignored.

/R Specifies that the machine should reboot after shutdown.

/T:xx Sets the timer for system shutdown in seconds.

http://20 sec. default

“Msg” Specifies an additional message

/Y Answer all following questinons with yes

/C Forces running applications to close.

ATTENTION: If you use the /C parameter NT ignores the

applications option to save data which may

have canged. You will see no File-Save dialog

box, because NT will force the application to

close. This will result in a loss of all data.

not previously saved !!!

C:\WINDOWS>

(imported comment written by SystemAdmin)

One solution is to set the following registry key.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor

“DisableUNCCheck”=dword:00000001