Solved

%username% in win98

Posted on 2000-05-12
9
377 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

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
 

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

Industry Leaders: 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

Suggested Solutions

Title # Comments Views Activity
Password recovery software 4 38
can i use this ip range for my company 3 35
80072efd error while checking for updates. 20 52
How do I restrict certain programs? 9 41
Have you ever set up your wireless router at home or in the office to find that you little pop-up bubble in the bottom right-hand corner of Windows read "IP Conflict - One of more computers on the network have been assigned the following IP address"…
Resolve DNS query failed errors for Exchange
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 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