Adding a startup shortcut to a newly created user

This issue has been solved. See solution.
rafi's picture

hi all,
I'm installing a program that creates new users ( i am using the net command for that) and i want to add a startup shortcut that is unique to each user.
the problem is that the user is actually created only at first login... is there a way to add the startup shortcut on his first login? or any other way??
Thanks in advance for every answer

Sean_Ebeling's picture

XP, 2k and NT Default User and or ALL USERS

To accomplish this, I would go to where local user profiles are stored and look for DEFAULT USER. You may have to choose the option to view hidden files.

The default user has the same desktop and star menu folders as any other account. If you place a shortcut here it will be put into any new profile that is created.

Another profile folder you will see is ALL USERS. It might be simpler to just place your shortcut in the startup folder of this profile. This shortcut will then be launched whenever ANY user logs in (new or old).

I would need additional detail about what your trying to do to give any further suggestion.

Good luck
~Sean

~Sean

rafi's picture

2 new diffrent users startup shortcuts

Ok, first of all thanks for the quick answer. second of all i'm sorry that i forgat to mention the operating system , it's windows xp.
the problem is like this : i create 2 new users that represent diffrent modes in my applicatoin there for each new user i create has a diffrent startup sequence i want to run ( a diffrent batch file that preforms some important tasks for each user) . there for all users doesn't help me because it's a diffrent batch file that needs to run for each new user i create, i can't allow one user's batch file to run at the second user's startup.
the default user i guess won't help me because it won't distinguish between the 2 users i create...
thanks again ..

Sean_Ebeling's picture

Group Policy or Login Script?

Here's a thought. Since you want this to run at startup one solution might be to group the users in AD according to which bat file they get and either publish the bat file to their desktop using a GPO or add to a logon Script.

~Sean

AngelD's picture

What should the uniq

What should the uniq user-batch-file perform?

rafi's picture

group policy how to?

hi sean,
your solution sounds good but i don't know how to do that programmaticly ....
is there an api do this? a command line?

-AngeID : it's quite complicated to get into what this batch run, in general the batch files handle network adapters runs certain programs in one user and other programs in another.

Gustavo Bignozzi's picture

Put the .BAT in all users, and add some logic

Solution

Are you working your organization with active directory or workgroups? Or distributing the installers to the end users?
If I did understand your problem well, and you create the 2 users, you could add some flow control to your batch file and put it in all users, so if the %Username% matches your user does some work, if matches the other user does other work, and if it matches none it does nothing... pseudo-batch:

IF %USERNAME%=Myuser1 GOTO MYUSER1
IF %USERNAME%=Myuser2 GOTO MYUSER2
GOTO END
:MYUSER1
[User1 commands]
GOTO END
:MYUSER2
[User2 commands]
GOTO END
:END

rafi's picture

So Simple..

Thanks , i feel dumb not to think of that my self...