China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-02 21:41
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How can a batch file simulate the "OK" button in the Desktop Properties panel View 1,042 Replies 4
Original Poster Posted 2006-12-24 22:34 ·  中国 湖南 郴州 电信
初级用户
Credits 66
Posts 28
Joined 2006-11-01 04:54
19-year member
UID 69099
Gender Male
Status Offline
I changed the registry, but if I don't click OK once in "Desktop - Properties", it won't take effect..
Is there any command that can replace OK? VBS is fine too
Floor 2 Posted 2006-12-24 22:57 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
  What do you mean by the “OK” button? Please modify the title and the related description.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 3 Posted 2006-12-24 23:19 ·  中国 湖南 郴州 电信
初级用户
Credits 66
Posts 28
Joined 2006-11-01 04:54
19-year member
UID 69099
Gender Male
Status Offline
For example, if you change the desktop background, you definitely need to click "Apply" or "OK" before the current settings take effect.
So what command has the same function as the "OK" button in "Desktop - Properties"?
Floor 4 Posted 2006-12-24 23:26 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
  A batch file can't simulate keypress operations. You should use a script like AutoIt to complete the task. Again, please modify the title.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 5 Posted 2006-12-25 07:07 ·  中国 辽宁 本溪 联通
银牌会员
★★★
Credits 1,212
Posts 464
Joined 2006-12-13 21:11
19-year member
UID 73417
Gender Male
Status Offline
'I think what the OP means is refresh. If it's refresh, you can use the script below.
set ws=createobject("wscript.shell")
ws.sendkeys "{f5}+{f10}e"
Forum Jump: