|
tghksj
社区乞丐
此图片另存后死机
积分 -49
发帖 90
注册 2006-12-2
状态 离线
|
『楼 主』:
[求助]如何通过rundll32.exe实现命令行更改桌面背景.
使用 LLM 解释/回答一下
如题:
显示器
模块: desk.cpl
命令: rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0
结果: 背景设置。
上面那个也不能直接改...下面却是屏保的,郁闷
模块: appwiz.cpl
命令: rundll32.exe desk.cpl,InstallScreenSaver c:\winnt\system\Flying Windows.scr
结果: 安装屏幕保护并显示预览属性页。
对于网络上可以查找到的rundll32.exe调用命令只是可以显示出某个操作界面.
对于脚本自动化没有任何作用...
关于命令行方式调用.dll函数的格式
以及支持带参调用的方式 是怎样 的资料一点也没有查到.
Last edited by tghksj on 2006-12-6 at 02:50 PM ]
Subject:
Monitor
Module: desk.cpl
Command: rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,0
Result: Background settings.
The above one can't be directly modified... The following is for screen saver, depressed
Module: appwiz.cpl
Command: rundll32.exe desk.cpl,InstallScreenSaver c:\winnt\system\Flying Windows.scr
Result: Install screen saver and display preview property page.
For the rundll32.exe call commands that can be found on the network, they only can display a certain operation interface.
It has no effect on script automation...
Regarding the format of calling .dll functions in command line mode
and the information about the way of supporting parameterized calls is not found at all.
[[i] Last edited by tghksj on 2006-12-6 at 02:50 PM [/i]]
|
|
2006-12-4 19:10 |
|
|
redtek
金牌会员
     
积分 2902
发帖 1147
注册 2006-9-21
状态 离线
|
『第 2 楼』:
使用 LLM 解释/回答一下
Brother, you can refer to the content of the following post, which talks about changing the desktop background from the registry, refreshing the desktop, to using third-party tools~ :)
Changing Desktop Background
http://www.cn-dos.net/forum/viewthread.php?tid=24982&fpage=1&highlight=%E6%A1%8C%E9%9D%A2
Setting Background Desktop, Creating Shortcuts, Emptying Recycle Bin, Command-line Utilities
http://www.cn-dos.net/forum/viewthread.php?tid=23132&fpage=1&highlight=%E6%A1%8C%E9%9D%A2
How to "Refresh Desktop" and Reload "explorer.exe" Using Rundll32?
http://www.cn-dos.net/forum/viewthread.php?tid=24465&fpage=1&highlight=%E6%A1%8C%E9%9D%A2
Last edited by redtek on 2006-12-4 at 08:08 AM ]
|

Redtek,一个永远在网上流浪的人……
_.,-*~'`^`'~*-,.__.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._,_.,-*~'`^`'~*-,._ |
|
2006-12-4 21:07 |
|
|
tghksj
社区乞丐
此图片另存后死机
积分 -49
发帖 90
注册 2006-12-2
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
RE redtek :
我的设想是想利用rundll32.exe可以调用函数的功能,实现单句达到目的.
因为在user.dll中有替换桌面背景的函数,只是我在命令行中用rundll32.exe调用后
没有任何反映.
我的问题的关键不在"更换桌面背景"而在于如何通过rundll32.exe来实现.
既然rundll32.exe可以调用.dll函数,那么批处理为什么不能利用它象VB.VC的面向对象编程呢?
关于借助于第3方插件的批处理我早就已经实现并使用.借助MS的"壁纸自动换"代码如下
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
COPY bgswitch.dll %WINDIR%\SYSTEM32\
COPY bgswitch.exe %WINDIR%\SYSTEM32\
REGSVR32 /S bgswitch.dll
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Directory" /t REG_SZ /d F:\桌面背景\wallpaper /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Refresh Unit" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Refresh Frequency" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Random" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Disabled" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Force Stretch" /t REG_DWORD /d 0 /f
bgswitch
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
啊对了,谢谢你给我的那个"TGHKSJ.CMD"加的5分,呵呵:P
Last edited by tghksj on 2006-12-6 at 02:54 PM ]
RE redtek :
My idea is to use the function of rundll32.exe to call functions to achieve the purpose in a single line.
Because there is a function to replace the desktop background in user.dll, but there is no reaction when I call it in the command line with rundll32.exe.
The key of my problem is not "changing the desktop background" but how to achieve it through rundll32.exe.
Since rundll32.exe can call.dll functions, why can't batch processing use it for object-oriented programming like VB.VC?
I have already implemented and used batch processing with the help of third-party plugins. The code for borrowing MS's "automatic wallpaper change" is as follows
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
COPY bgswitch.dll %WINDIR%\SYSTEM32\
COPY bgswitch.exe %WINDIR%\SYSTEM32\
REGSVR32 /S bgswitch.dll
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Directory" /t REG_SZ /d F:\Desktop Background\wallpaper /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Refresh Unit" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Refresh Frequency" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Random" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Disabled" /t REG_DWORD /d 0 /f
REG ADD HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\BackgroundManager /v "Force Stretch" /t REG_DWORD /d 0 /f
bgswitch
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
Oh right, thank you for adding 5 points to my "TGHKSJ.CMD", heh heh :P
[[i] Last edited by tghksj on 2006-12-6 at 02:54 PM [/i]]
|
|
2006-12-7 03:41 |
|
|
lovehack2006
初级用户
 
积分 135
发帖 64
注册 2006-12-20
状态 离线
|
|
2007-2-16 03:29 |
|
|
anqing
高级用户
   
积分 859
发帖 413
注册 2006-8-14
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
顶一下,我也想知道api的函数功能
Bump, I also want to know the function of the API function
|
|
2007-2-16 22:24 |
|
|
gne3
高级用户
    DOS学徒
积分 526
发帖 252
注册 2007-2-12
状态 离线
|
|
2007-2-17 01:14 |
|
|
everest79
金牌会员
      一叶枝头,万树皆春
积分 2564
发帖 1127
注册 2006-12-25
状态 离线
|
『第 7 楼』:
使用 LLM 解释/回答一下
reg add "hkcu\control panel\desktop" /v TileWallpaper /d 0 /f
reg add "hkcu\control panel\desktop" /v Wallpaper /d %wallpaper% /f
reg add "hkcu\control panel\desktop" /v WallpaperStyle /d 2 /f
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
%wallpaper%为完整路径的BMP文件
```
reg add "hkcu\control panel\desktop" /v TileWallpaper /d 0 /f
reg add "hkcu\control panel\desktop" /v Wallpaper /d %wallpaper% /f
reg add "hkcu\control panel\desktop" /v WallpaperStyle /d 2 /f
RunDll32.exe USER32.DLL,UpdatePerUserSystemParameters
%wallpaper% is a BMP file with a full path
```
|
|
2007-2-17 02:49 |
|