A script that will .......

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

A script that will .......

Post by XY fan »

take me as far in to

Control Panel--Recovery--Configure System Restore--System Protection, Configure

as possible. I want to use it in a button on my XY Tool Bar.

admin
Site Admin
Posts: 66102
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: A script that will .......

Post by admin »

Click-baity topic captions in a user forum? Think again...

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

That Topic Header was one of the autofil options

highend
Posts: 14926
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: A script that will .......

Post by highend »

Code: Select all

run """D:\Tools\Nirsoft\NirCmd\x64\nircmd.exe"" exec show ""rundll32.exe"" shell32.dll,Control_RunDLL sysdm.cpl,,4";
One of my scripts helped you out? Please donate via Paypal

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

Doesn't work for me - I just get "The System Cannot Find the File Specified" - and I don't have NirCmd installed although I do know what it is.

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: A script that will .......

Post by klownboy »

If you don't have Nirsoft utilities installed

Code: Select all

run "Rundll32.exe shell32.dll,Control_RunDLL Sysdm.cpl,,3",,0,0; 
or
run "control.exe /name Microsoft.Recovery",,0,0;

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

Thanks klownboy - the second one works and goes as far as "Configure System Restore"

Is it possible for the Script to get any further - such as the next step of "System Protection"?

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: A script that will .......

Post by klownboy »

This may be a step closer:

Code: Select all

 run "%SystemRoot%\SysNative\cmd.exe /C systempropertiesprotection",,0,0;
This line will run restore:

Code: Select all

run "%SystemRoot%\SysNative\cmd.exe /C rstrui.exe",,0,0;

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

Yep - that works, the first one takes you direct to "System Protection".

I don't suppose it can get any further? - Configure.

But thanks for this.

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

I don't suppose it can get any further? - Configure?

highend
Posts: 14926
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: A script that will .......

Post by highend »

Ofc this is possible. But not through XY alone (and the compiled AHK .exe DOES require admin permissions!)...

Code: Select all

    run "%SystemRoot%\SysNative\cmd.exe /C systempropertiesprotection",,0,0;
    run "D:\Users\highend\Downloads\Click Configure... button in System Properties, System Protection tab.exe";
Rename the script from .xys to .ahk, compile it and adapt the path in the script lines above
To see the attached files, you need to log into the forum.
One of my scripts helped you out? Please donate via Paypal

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

Thanks highend. I'll contemplate this - I am not looking for something that requires more than XY because I want to run it from a button on the XY toolbar - and also not looking for more clicks (admin permission). But thanks for the effort.

highend
Posts: 14926
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: A script that will .......

Post by highend »

because I want to run it from a button on the XY toolbar
Nothing hinders you from doing that even with that AHK script
and also not looking for more clicks (admin permission)
You could run XY with admin permissions and apart from that, UAC can be controlled via gpedit.msc (no clicks at all)
One of my scripts helped you out? Please donate via Paypal

XY fan
Posts: 246
Joined: 24 Mar 2022 10:58
Location: Windows 11 225% scaling on 3840 x 2400 screen

Re: A script that will .......

Post by XY fan »

Thanks again highend. This is beyond my present sripting abilities but I will try to get there with some time.

A modified version of

run "%SystemRoot%\SysNative\cmd.exe /C systempropertiesprotection",,0,0; (thenks to klownboy)

going a step further (Configure) would be more straightforward but not possible I gather.

Post Reply