Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

%username% in win98

Posted on 2000-05-12
9
Medium Priority
?
392 Views
Last Modified: 2013-12-19
I'm trying to write a command in the NT logon script which references the username of the person logging in.

I need to point to a profile directory to automatically update a file.

However, using c:\windows\profiles\%username%\dir
doesn't work.

Can anyone help me ASAP, i have a 5.30 deadline today!!!
0
Comment
Question by:stevenm
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 2805252
Tis should work with no problem.
Try double %% instead of single.
Also try test prints and setting Environment variables.
Also try Kixstart instead of regular login scrits.

I hope this helps.

--------------------------------------
You cant map printers from your standard batch file in Nt you have to
 use a little app called KIX it really takes care of business. I was having
  this same problem and could not mapped a printer VIA a script upon
  logon and this little program took care of it. IF your using NT clients
    then just drop the Kix.EXE in the NETLOGON directory with the name
   of the script( you will have to determine how you want to scripts to run,
   either a default one for everyone or for individual users -so read the
                            help to see what best works for you).

                            The site to go to is:
                            http://kixtart.to/script/ 

     Check it out, it will take way all your scripting issues away. You also
      have an older version available on your Resource kit.
0
 
LVL 4

Expert Comment

by:wlaarhov
ID: 2806904
There is no %username% in win9x, the only way to get around this is use Kixtart.
If you goto http://members.home.net/musicon/ you will find some excelent scripts that can be used for any mixed mode environment, including win9x.

0
 

Expert Comment

by:mysticz
ID: 2807625
Setting Up User Profiles on a Windows NT Network
 
You can use user profiles with Windows 98 on a Windows NT network if the computer is configured to use Client for Microsoft Networks.
Note   Windows 98 does not use the Profiles directory on a Windows NT server; that directory is used only for Windows NT profiles.
To set up user profiles on a Windows NT network
1. For each computer, make sure that user profiles are enabled, as described in “Enabling User Profiles” earlier in this chapter.
2. In Control Panel, double-click Network, and then select Client for Microsoft Networks as the Primary Network Logon client.
3. Select Client for Microsoft Networks in the list of installed network components, and then click Properties.
4. Select Log on to Windows NT domain, enter the domain name, and then click OK.
5. On the Windows NT server, make sure each user is properly set up and has an assigned home directory on a Windows NT network server. (You can use the Windows NT User Manager tool to create this directory.)
When the user logs off, Windows 98 automatically places an updated copy of the user profile in the user’s assigned home directory on the Windows NT network, in the following path:
\\specified_server\user’s home directory
For information about User Manager and home directories, see Microsoft Windows NT Server 4.0 online Help.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Accepted Solution

by:
londonthing earned 200 total points
ID: 2836666
Under NT %userprofile% will do the job.

I have no idea whether or not this works on 98.

Anyway, profiles are weird under 98.  The profile can only be created by setting 'multiple users' on the workstation.  This profile is then created under %systemroot%\profiles\%username% and gets uploaded to their home directory.  The NT server profile setting does not affect this.

It might be worth adding a comment saying exactly what it is your're trying to do as there may another way to do it.

Sorry if you missed your deadline.
0
 

Author Comment

by:stevenm
ID: 2845011
Answer accepted
0
 

Author Comment

by:stevenm
ID: 2845012
I've accepted the answer but I'd already solved the problem myself.

Thanks anyway.
0
 

Expert Comment

by:londonthing
ID: 2845782
did %username% work?

i don't see win98 much these days!
0
 

Author Comment

by:stevenm
ID: 2848974
No, it doesn't work in win98 so I just gave up on doing it that way!
0
 
LVL 4

Expert Comment

by:wlaarhov
ID: 2851560
OK, now you have wasted your time trying something that would not work from the start.
You should have spend the time on sysexperts comment, and have gave him the points (because he was the first to bring up kixtart).

Nice weekend.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
Measuring Server's processing rate with a simple powershell command. The differences in processing rate also was recorded in different use-cases, when a server in free and busy states.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question