Search found 7 matches

by sambul36
01 Jun 2022 07:41
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 40610

Re: Dynamically change icon in context menu

full path Yes, it works. :) Also works this way, and in fact that type name should be in the original batch code for completeness: for %%d in (1 2 3) do ( if !plan%%d!==!pln! ( reg add "%key%" /v "Icon" /t REG_EXPAND_SZ /d !icon%%d! /f > nul )) But why the above .reg file can't add its keys to Win ...
by sambul36
30 May 2022 13:19
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 40610

Re: Dynamically change icon in context menu

Thanks for the suggestion, I already did it to have faster access to main Context menu. The Change Power Plan menu does appear and work the same way in Win 11 as in Win 10 now, except the above icon batch gives unspecified execution error. I wonder if someone is able to test it on a Win 11 64bit US ...
by sambul36
30 May 2022 13:03
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 40610

Re: Dynamically change icon in context menu

Thanks for the reply. I checked it out, and apparently these strings remained the same (see screenshot). Further, I can change the powerplan from Context Menu without errors, only changing the relevant icon by the scheduled task gives an error. However, the Task finishes without any errors in the Ev...
by sambul36
29 May 2022 22:19
Forum: DOS Batch Forum
Topic: Dynamically change icon in context menu
Replies: 38
Views: 40610

Re: Dynamically change icon in context menu

Can someone point why the above batch PlanIcon.bat worked well in Win 10 64bit, but doesn't work in Win 11 64bit? @echo off :: The batch updates Active Power Plan icon in Desktop Context Menu, when Power Plan is changed. Can run as a scheduled task triggered by EventID 12 "Power Plan changed" setloc...
by sambul36
13 Nov 2020 23:34
Forum: DOS Batch Forum
Topic: Entering batch argument groups during execution
Replies: 2
Views: 3733

Re: Entering batch argument groups during execution

Thanks. Are any other approaches available to enter batch arguments in groups aiming for the shortest or less deviating from the above example code possible? I found simpler approach: take an array parameter in quotes . Then process that parameter %~n as an array, which you have to do anyway: set /p...
by sambul36
11 Nov 2020 20:38
Forum: DOS Batch Forum
Topic: Entering batch argument groups during execution
Replies: 2
Views: 3733

Entering batch argument groups during execution

Below is given a snippet from a lengthy batch. In this snippet a user is expected to enter batch arguments in a simple one line sequence without further questions asked. However, it works only when each argument is represented by one value. How to make it work for an argument represented by several ...
by sambul36
11 Nov 2020 20:19
Forum: DOS Batch Forum
Topic: Debugging / syntax checksing tools for batch
Replies: 27
Views: 28324

Re: Debugging / syntax checksing tools for batch

ShadowThief wrote:
16 May 2020 06:53
I wrote a script to echo a number after each line in your script.
Is that the last executed line number echoed? Can you post an example of such script here for a basic test batch sample.