Start Menu ShortCut + Parameters - Bug?

J

Jason Teagle

WinXP Pro, SP1

I'm trying to create an installation package for a screensaver, and so I
want to put shortcuts into the start menu to allow the user to configure it
and test it without having to go through the Display Properties dlg. But
there seems to be a subtle bug.

To configure a screensaver, the Properties box and the context menu in
Explorer issue "/C:nnn" as the command-line parameter, where nnn is, I
assume, a parent window's handle. So my screensaver checks for "/C:" as the
first three characters to know if it should configure or run. From the
Properties box, this works fine; from the context menu of Explorer, this
works fine; from a manual command line at the command prompt, this also
works fine.

But I created a Start Menu shortcut which I can verify says
"myscreensaver.scr /C:0" (the parent window part is unused by my
screensaver), and whenever I try that, it does NOT work. By a quick message
box in the code, I can see that it is started with /S (for Start running)
EVEN THOUGH THE GIVEN PARAMETER IS /C:0!!!

Is this a bug on XP's part? It seems it is being too 'intelligent' and since
it's a screensaver, ignoring my parameter and issuing /S. I can assure you I
can put anything I like as the parameter and it will happily ignore it and
issue /S.

Command line parameters on EXEs DO work, before anyone wonders if my whole
system is shot {:v)

Any ideas?
 
C

Code-Curious Mom

I can't say if this behaviour is a bug or not. But here is a workaround for
starting the config dialog:
Make a *.bat file with this line:

start "" "(path to scr)\myscreensaver.scr"

then have your StartMenu shortcut run the bat file. Set the shortcut's
properties to 'Run minimized'. The only screensavers I've created use -c
for config, but perhaps that will work with /C: also if that's what you want
to use. Right-click the actual scr file and choose configure, install, or
test seems simple enough to me already, but you know what you want better
than I do. Hope this is some help anyway.
 
J

Jason Teagle

I can't say if this behaviour is a bug or not. But here is a workaround
for
starting the config dialog:
Make a *.bat file with this line:

start "" "(path to scr)\myscreensaver.scr"

That's a pretty darned good idea, thanks.
to use. Right-click the actual scr file and choose configure, install, or
test seems simple enough to me already,

For people who like to do it manually, I agree - but for Average End User,
we can't expect them to navigate to the file and do that really. Of course,
it can be done through the standard Display Properties dlg, but it just
seemed nice to do it through a shortcut. No biggie.

Thanks for the idea.
 

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