Solved

%username% in win98

Posted on 2000-05-12
9
342 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
 

Accepted Solution

by:
londonthing earned 100 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
AD health monitoring 2 58
Need a cheap RFID setup 10 42
Communication with an active RFID 7 38
Network Switch Connections 8 30
A common practice in small networks is making file sharing easy which works extremely well when intra-network security is not an issue. In essence, everyone, that is "Everyone", is given access to all of the shared files - often the entire C: drive …
The Need In an Active Directory enviroment, the PDC emulator provide time synchronization for the domain. This is important since Active Directory uses Kerberos for authentication.  By default, if the time difference between systems is off by more …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now