Sysinternals BgInfo - Need help on its /ALL option

V

Vanguard

According to the help on BgInfo, I should be able to use the /all
command-line option to have it update the wallpaper for all users logged
in. So I added an event in Task Scheduler to RunAs Administrator every
15 minutes using the /all option. The idea is that whomever is logged
in at the time will get their wallpaper updated to show the snapshot
made by BgInfo. I may make the snapshots occur at longer intervals but
I need to get something else fixed first.

When I run the scheduled event (or if I execute "bginfo.exe /all
/timer:0"), a dialog pops up asking if I want to use (or maybe it was
save) a configuration file. The /timer:0 parameter tells it to make the
wallpaper update instead of bring up its configuration window. No, I
did not specify a configuration file in the command line to execute
bginfo.exe because I want to use the settings that it saves in the
registry. Actually I get 2 of these dialogs, probably because there are
2 username defined on my system, Administrator and mine (both in the
Administrators group). Clicking no results in no update to the
wallpaper. Clicking yes results in an error that BgInfo can only use
one configuration file, even after canceling the first dialog and
leaving only the 2nd dialog (so there should only be one remaining
instance of this dialog asking for a configuration file).

I've had BgInfo save a configuration file, put it in a path where anyone
can read/write it, and change the scheduled event to "bginfo.exe cfgfile
/all /timer:0" but still get those 2 popup dialogs. For now, I've put
"bginfo.exe /timer:0" in the Startup group for All Users but that means
their wallpaper only gets updated when they login.
 
V

Vanguard

Some other peculiarties that I've noticed:

When I execute at the command line in a DOS shell:

runas /user:<domain>\Administrator "bginfo.exe /timer:0"

and answer the prompt for a password, this should change change the
Administrator's wallpaper. Instead I get:

An error occured while attempting to set the new desktop settings.
Please ensure the current user has rights to change desktop
settings:
Cannot create a file when that file already exists.

I click OK and get:

Error creating bitmap file.

My username is in the Administrator's group and should then have the
same rights as Administrator. I doubt, however, that my username is
listed in the directory and file permissions to write into
Administrator's profile directory. But I did not specify a
configuration file. With no configuration file specified, BgInfo should
read its settings from the registry.

Also, after click OK to close this error dialog, bginfo.exe does NOT
unload. It stays in memory. If I try another execute of this command
line, I get the same error dialogs but now there are 2 instances of
bginfo.exe loaded.

So, for now, I give up on trying to use runas to have BgInfo change the
wallpaper for a different username than the one under which I am
currently logged in. I figure that might have to do with file
permissions under the other username's profile directory or with
security permissions on registy keys. Back to using the /all parameter.
I run:

bginfo.exe /timer:0 /all

The popup dialog says:

Cannot find the configuration file
'Files\SysInternals\Bginfo.exe.bgi'
Do you want to create the file?

The syntax for BgInfo is "bginfo [configurationfile] [options]" (the /i
and /iq options to specify the configuration are deprecated). I have
not specified a configuration file. But notice 2 things: (1) Part of
the path has been truncated ("C:\Program " is missing); and, (2) the
assumed configuration file is the executable filename with ".bgi" tacked
on (the extension BgInfo expects for its configuration files). It looks
like the author screwed up in parsing the path and forgot that in
Windows (and Unix) that spaces are allowed. So what the author has done
is parsed the command input by space-delimited words so the %0 parameter
becomes C:\Program (instead of "C:\Program
Files\SysInternals\Bginfo.exe") and %1 becomes
"Files\SysInternals\Bginfo.exe" (instead of "/timer:0"). It becomes
obvious why when I click OK to save this configuration file (for which I
should not have been prompted) why it then complains "The system cannot
find the path specified" (it won't create the path, just the file, and
no such relative path exists from the current directory in which I have
executed BgInfo).

I've tried to report the bug using the program's own Help->About->Email
but that errors with "MAPI error 3". E-mail works just fine. It's just
this program that doesn't call it correctly. So I'll have to see if
they provide mailto:// links on their web site to report bugs for their
freebie utilities.

I'll have to test moving BgInfo into a path that doesn't have spaces (or
any other potentially "weird" but legal characters that might screw up
the author's method of parsing the command input string).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top