Melvyn 2011-10-03 01:19
I am trying to apply a wallpaper profile from a batch file at the same time as switching display profiles. The commands are fine and if I run two separate batch files it works great. However, I'd like it to be a single step. I find that when I run the command from within the batch file, the wallpaper profile is applied (I see this when I open the UltraMon GUI) but the wallpaper hasn't changed.
|
Christian Studer 2011-10-03 10:28
Try putting in a delay between applying the profile and loading the wallpaper, most likely the problem is that UltraMon updates the wallpaper in response to the display configuration change, and this prevents the new wallpaper from getting loaded properly.
Here's a sample batch file which waits 5 seconds:
start "" /WAIT "%ProgramFiles%\UltraMon\UltraMonShortcuts.exe" /l "%APPDATA%\Realtime Soft\UltraMon\3.1.0\Profiles\Dell + TV.umprofile" ping localhost -n 5 -w 1000 >nul "%ProgramFiles%\UltraMon\UltraMonDesktop.exe" /load "%APPDATA%\Realtime Soft\UltraMon\3.1.0\Wallpapers\Gradients.wallpaper"
Change the -n argument for ping to change the delay.
Christian Studer - www.realtimesoft.com
|
Melvyn 2011-10-04 17:54
Thanks. While continuing my testing and research I too concluded that a delay was required. The solution I'm using is this:
"%ProgramFiles%\UltraMon\UltraMonShortcuts.exe" /l "%appdata%\Realtime Soft\UltraMon\3.1.0\Profiles\Test Profile.umprofile" echo wscript.sleep 5000 > temp.vbs start /wait temp.vbs "%ProgramFiles%\UltraMon\UltraMonDesktop" /load %appdata%\Realtime Soft\UltraMon\3.1.0\Wallpapers\Test Wallpaper Profile.wallpaper del temp.vbs
I find it a little annoying that UM is inconsistent in how it needs variables to be passed (see how the monitor profile must be in quotes but the wallpaper one cannot) but this is the right path I think. The main issue I'm having now is that when called like this, it sometimes leads to the crash message indicating that the file wasn't found. And sometimes it doesn't. I'll try increasing the delay.
|
Christian Studer 2011-10-05 10:11
I would recommend using ping instead, worked fine for me. Alternatively you could also do everything from a VBScript file, use the WScript.Shell object's Run method to launch the applications.
With 3.1.0 you can put the wallpaper filename in double quotes as well, this was changed in one of the prior releases.
Christian Studer - www.realtimesoft.com
|