Start a .lnk via the "Run" setting in the registry.

R

Ralph Malph

Need to use the "Run" setting in the registry to run a program. I can not use
the "startup" folder as that causes security problems. Would just run the
program from .exe but MS is not smart enough to use the .exe program location
as the default startup folder. It wants to use the user profile as default.
In a link I can tell it to use the proper startup folder. (Leave it to MS to
ALWAYS make the wrong choice on default settings and make it darn near
impossible to correct them)

Thanks for the help,

Ralph Malph
 
P

Pegasus \(MVP\)

Ralph Malph said:
Need to use the "Run" setting in the registry to run a program. I can not
use
the "startup" folder as that causes security problems. Would just run the
program from .exe but MS is not smart enough to use the .exe program
location
as the default startup folder. It wants to use the user profile as
default.
In a link I can tell it to use the proper startup folder. (Leave it to MS
to
ALWAYS make the wrong choice on default settings and make it darn near
impossible to correct them)

Thanks for the help,

Ralph Malph

No need for a .lnk file if you make your registry value like so:
cmd /c start /b /d"c:\Program Files\Ralph" "Something.exe"

It might be a good idea to look at the issue of launch folders from all
sides, not just your own. Many people would strongly object if programs
automatically defaulted to their home folder at launch time. They often want
them to remain in the current working directory.
 
R

Ralph Malph

Pegasus,

Thank you for the reply. I have seen that solution, but this user is not an
Admin and on this PC is prevented from using cmd.exe.

Thanks for trying, any other ideas?

Ralph Malph
 
P

Pegasus \(MVP\)

Ralph Malph said:
Pegasus,

Thank you for the reply. I have seen that solution, but this user is not
an
Admin and on this PC is prevented from using cmd.exe.

Thanks for trying, any other ideas?

Ralph Malph

You can use the solution that you suggested yourself in the Subject line:
Put a reference to your .lnk file into the registry Run key.
 
R

Ralph Malph

Pegasus,

Thank you once again for responding. I did put a call to the .lnk in the run
section of the registry, but nothing happend and I figuard I must have been
using the wrong syntax. That is why I posted my question. As it turns out I
did have a systax problem related I am sure to fat fingers on the keyboard
and bad eyes at high resolution. :) Stupid me. I have since redone the .lnk
call and it is now working.

Thank you for helping me work through this and letting me know that what I
was originally trying to do should have worked which helped me discover my
errors.

For those who are following this and would like the working solution with
correct syntax here is the regkey export for your use as a model:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"EMS Clinical Scheduler"="\"C:\\Documents and
Settings\\the.student\\Desktop\\EMS Clinical Scheduler.lnk\""


Thanks again Pegasus,

Ralph Malph
 
P

Pegasus \(MVP\)

Ralph Malph said:
Pegasus,

Thank you once again for responding. I did put a call to the .lnk in the
run
section of the registry, but nothing happend and I figuard I must have
been
using the wrong syntax. That is why I posted my question. As it turns out
I
did have a systax problem related I am sure to fat fingers on the keyboard
and bad eyes at high resolution. :) Stupid me. I have since redone the
.lnk
call and it is now working.

Thank you for helping me work through this and letting me know that what I
was originally trying to do should have worked which helped me discover my
errors.

For those who are following this and would like the working solution with
correct syntax here is the regkey export for your use as a model:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run]
"EMS Clinical Scheduler"="\"C:\\Documents and
Settings\\the.student\\Desktop\\EMS Clinical Scheduler.lnk\""


Thanks again Pegasus,

Ralph Malph

I knew it had to work because I tried it myself before replying. Glad to
hear that you sorted it out. However, I have a couple of problems with your
example:
- It contains an unmatched double quote
- My own test and the pre-existing items in the "Run" key used single
backslashes and no leading backslash after the "=". Your example is the
opposite.

Puzzling . . . Still - thanks for the feedback.

"EMS Clinical Scheduler"="\"C:\\Documents and
Settings\\the.student\\Desktop\\EMS Clinical Scheduler.lnk\""
 

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