Creating Shortcuts in specific user Startup folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a user account, MyUser, to be used as the primary user account. I have the Automatic Logon Component added to my SLX specifying the MyUser account as the default. I want an application to start automatically when MyUser logs on but not for any other user. How is this accomplished?

I tried adding a shortcut to the "Doc & Settings\MyUser\Start Menu\Startup" at design time but when the user profile is created during the first logon or during FBA (not sure which one), a new profile is created under "Docs & Settings\MyUser.MYUSER" and the shortcut goes unused.

Any assistance is greatly appreciated.
 
harrier,

If "Doc & Settings\MyUser\Start Menu\Startup" is there, when the profile is created it is going to use different directory (that is
what you saw).

What you may want to do is to "setup" the Startup link after the user profile is created. E.g., you can copy/move the shortcut to
the "Doc & Settings\MyUser\Start Menu\Startup" folder at very late FBA phase from another existing directory (from \Windows, for
instance). Then reboot. All this can be done with one FBA Generic Command.

There are possible many other solutions to the problem.

--
Regards,
KM, BSquare Corp.

I have a user account, MyUser, to be used as the primary user account. I have the Automatic Logon Component added to my SLX
specifying the MyUser account as the default. I want an application to start automatically when MyUser logs on but not for any
other user. How is this accomplished?
I tried adding a shortcut to the "Doc & Settings\MyUser\Start Menu\Startup" at design time but when the user profile is created
during the first logon or during FBA (not sure which one), a new profile is created under "Docs & Settings\MyUser.MYUSER" and the
shortcut goes unused.
 
harrier,

You mentioned "Automatic Logon" component being added. Haven't you set it up to auto logon to the user account?

If not, can you elaborate on what you are trying to accomplish overall? What user account setup?

--
Regards,
KM, BSquare Corp.

My guess is your suggestion isn't going to work. I'm running a dual boot with XP Pro on C:\ and XPE on D:\. I built a new image
and let FBA complete. I booted into XP Pro after the reboot initiated by FBA completion so I could look at what happened without
"disturbing the evidence." The only profile directories that exist are All Users and Default User. It appears the MyUser profile
will not be created until the first logon, resulting in the behavior described in my original post.
 
KM,

The missing pieces. The FBA command to move the shortcut won't run until after FBA completes and the system reboots. Because automatic logon is configured, the system will auto logon creating the profile. Hopefully the profile is created before the FBA command to move the shortcut runs. This is yet TBD.

For moving the shortcut file, I'm getting an exeception using Rundll32.exe kernel32.dll,MoveFile Src_File Dest_File. What do you recommend for moving the file?

harrier
 
harrier,

I mentioned "very late" FBA phase specifically to make sure you copy the shortcut *after* the account profile is created.

You can always setup a set of batch files to run as Startup items (use All Users StartUp folder) to set up necessary account
files&settings. You will just have to switch Autologon to another account during the procedure.
If you want, you can search this NG archive. A while ago I posted a "batch solution" for similar issue.

I don't think MoveFile API is permitted for Rundll32.exe calls.
Just you use "rename" command (if you move the file to a new location on the same volume).

--
Regards,
KM, BSquare Corp.

KM,

The missing pieces. The FBA command to move the shortcut won't run until after FBA completes and the system reboots. Because
automatic logon is configured, the system will auto logon creating the profile. Hopefully the profile is created before the FBA
command to move the shortcut runs. This is yet TBD.
 
harrier,

I must reply to you message. I still think it is possible to automate the user account setup. I can't say it is completely through
TD - you will have to do batching, use Start Up items, etc. - but it is doable anyway.

In one of my systems I did that - setup a few user account with pretty complicated file structure (various files in various user and
system locations). The whole setup was automated.

Here is the thread I referred to:
http://groups.google.com/groups?hl=...=1&[email protected]
Sorry my English. It is sometimes not clear what I meant but still the automation method I described there should be understandable.

--
Regards,
KM, BSquare Corp.

KM,

Thanks for all your help. Not the answer I was hoping for but nonetheless an answer.

This reply is basically for the benefit of readers so they understand how this ends.
___________________________________________________
I now understand what late means from a process standpoint -- after the first reboot FBA commands may still run when loading XPE
for the first time. In other words, FBA may not complete all tasks during its initial execution.
It sounds like what I want to do cannot be automated 100% through TD, which is what I was hoping for. At least not without
jumping through hoops and nearing the line between complicated automation or an easy manual process.
The end result will probably be a manual process to copy the shortcuts to where they need to be. I have 4 user accounts, two of
which use the same shortcut, one of which uses a different one and the last not having any (Administrator).
I've looked at "Different Shells for Different Users," but I need to load the explorer shell for all users, just automatically run
different programs for different users. One alternative is to place the logic into a single bootstrap application that shells out
to different EXEs based on the user name.
 
Back
Top