Inexplicable behavior difference in nearly identical shortcuts

May 20, 2008
3,515
4
Elkridge, MD, USA
I have two desktop shortcuts which are nearly identical, see below. Both change screen size to 1024x768 using external program QRES.EXE successfully, and supposed to change screen saver timeout - the first to 1000s, the second to 15s. Only the Shortcut 2 changes the screensaver timeout. Using %+ or & in Shortcut 1 instead of ^ (my default since 4DOS for command separator) made no difference. Note that SHRALIAS is already loaded when either one is invoked, and there may be active TCC session (fully initialized, explicitly specifying the command separator character), or no TCC.

Shortcut 1

Command=F:\JPSOFT\IR\tcc.exe
Arguments=/I /H /L: /C ( F:\UTIL\qres.exe /v /x:1024 /y:768 ^ set _dummy=%@winsystem[17,1] ^ set _dummy=%@winsystem[15,1000] ^ exit )
DirectoryDescription=Set screen size to 1024x768
Link=C:\Documents and Settings\All Users\Desktop\1024 acs3.lnk
Icon=C:\WINDOWS\system32\SHELL32.dll
Offset=22
Mode=1
Hotkey=Shift-Ctrl-Alt-3


Shortcut 2

Command=F:\JPSOFT\IR\tcc.exe
Arguments=/I /H /L: /C ( F:\UTIL\qres.exe /v /x:1024 /y:768 ^ set _dummy=%@winsystem[17,1] ^ set _dummy=%@winsystem[15,15] ^ exit )
DirectoryDescription=15-s screensaver
Link=C:\Documents and Settings\All Users\Desktop\Screensaver Instant acsD.LNK
Icon=%SystemRoot%\system32\SHELL32.dll
Offset=109
Mode=1
Hotkey=Shift-Ctrl-Alt-D
 
May 20, 2009
293
5
57
ITALY
I have two desktop shortcuts

What happens if You try the same commands at the command prompt?

What do You get if You type

echo %@winsystem[14] & echo %@winsystem[15,15] & echo %@winsystem[14]

to get previous value, change to the wished one, and get the new one?

Regards

Rodolfo Giovanninetti
 
May 20, 2008
3,515
4
Elkridge, MD, USA
From: Rodolfo
| Originally Posted by Steve Fabian
|| I have two desktop shortcuts
|
| What happens if You try the same commands at the command prompt?
|
| What do You get if You type
|
| echo %@winsystem[14] & echo %@winsystem[15,15] & echo %@winsystem[14]
|
| to get previous value, change to the wished one, and get the new one?

Thanks for the question. From the command line there is no problem, everything works as expected. The issue is that I want to combine two actions - change of screen resolution and change of screensaver timeout - into a single desktop shortcut, usable whether or not there is a TCC instance active. Each of my 5 similar shortcuts performs the first action correctly, but only one of them does BOTH. The other 4 require using another shortcut (not mentioned before) that correctly performs the second action alone. The question I raised was why only 1 of the 5 works correctly, but the other 4 fail to do ALL they are supposed to?
--
Steve
 
May 20, 2008
3,515
4
Elkridge, MD, USA
From: Charles Dye
| Originally Posted by Steve Fabian
|| The question I raised was why only 1 of the 5 works correctly, but
|| the other 4 fail to do ALL they are supposed to?
|
| They aren't by any chance set to run as administrator, or under
| different user's credentials, are they? Screen saver settings are
| per-user....

No to both. All were created using the SHORTCUT command, which does not support "run as" or alternate credentials. I am always logged into WinXP SP3 as a user with administrator rights. All shortcuts of interest are in the "All Users" desktop directory.
--
Steve
 
Steve,

I realise that this is likely teaching my grandmother to suck eggs, but have you tried changing the parameters such that the TCC sessions remain active and visible and ECHOing the results from the @WINSYSTEM functions rather than just swallowing them?? Perhaps one of them is failing for some reason.

Alternatively, why not create a batch file that takes the relevant parameters and invokes the three commands replete with error handling that keeps the session active and unhides the window??
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,495
91
Albuquerque, NM
prospero.unm.edu
Also, have you tried delaying for a second or two after calling QRES, or launching QRES with START /WAIT? Or changing the screen-saver settings before the resolution?
 
Similar threads
Thread starter Title Forum Replies Date
H @XMLNODES - New behavior? Support 3
Jesse Heines Strange Line Wrapping Behavior Support 14
H Behavior change re piping a string to a Java program Support 1
Jay Sage Baffling Behavior With TPIPE Support 5
D Pasting Unicode data has different behavior on TCC and CMD Support 2
P "Set" command behavior - a bug? Support 3
P LOG command behavior Support 3
I Puzzling Behavior of TDRV and DEL Support 2
N Fixed Strange dir behavior Support 6
A Inconsistent @WINPOS // ACTIVATE /POS= behavior Support 0
P Strange mouse behavior with list Support 2
R Find in screen buffer - find next behavior Support 0
D v20 code page behavior changes Support 2
D Strange DO behavior with /O Support 5
Jay Sage Change in Behavior of Activate Command Support 4
deleyd Fixed Behavior different than CMD Support 1
jwiede Difference in "FOR /F" behavior (?) Support 1
R Difference in behavior of RMDIR vs. CMD.EXE? Support 5
D Fixed Change in behavior of variable expansion between 16 and 17 Support 3
D Unexpected behavior Support 8
D Bash-like Esc->Backspace behavior Support 4
C ZIP behavior Support 5
Charles Dye Odd behavior after using OPTION "Advanced" tab Support 2
C odd behavior of "dir" Support 0
M How to? Work around an unexpected and very inconvenient behavior of TCC... Support 26
A expected behavior of move /sx Support 14
M WAD A complaint regarding a very irritating TCC installation behavior... (Bug?) Support 4
Peter Bratton @ping behavior change Support 2
vefatica SHORTCUT behavior (Win7) Support 3
M A question about new behavior that’s a minor irritation… Support 16
M Strange behavior... Support 2
S MSGBOX - inconsistent behavior Support 1
vefatica @REGEX: behavior vs. documentation Support 2
vefatica Strange behavior reloading SHRALIAS sav files. Support 1
S Strange CHKDSK behavior Support 6
Fross Odd IF behavior Support 3
M (Somewhat unbelievable) Do While Behavior/Question Support 1
S RECYCLE /P - unexpected behavior Support 0
J Odd OPTION behavior Support 1
E TCC/CMD difference Support 5
R Difference between TCC and CMD: variable names with hyphens Support 4
W Starting program for word to pdf conversion (difference cmd and tcc) Support 13
C Documentation difference between appdata and localappdata ? Support 6
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
Steve Pitts Difference in exection with and without START Support 24
S TCC 9.02 vs 4NT 8.02 difference - for %a COPY Support 6

Similar threads