Solved

%username% in win98

Posted on 2000-05-12
9
385 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
Optimum High-Definition Video Viewing and Control

The ATEN VM0404HA 4x4 4K HDMI Matrix Switch supports 4K resolutions of UHD (3840 x 2160) and DCI (4096 x 2160) with refresh rates of 30 Hz (4:4:4) and 60 Hz (4:2:0). It is ideal for applications where the routing of 4K digital signals 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Nslookup is a command line driven utility supplied as part of most Windows operating systems that can reveal information related to domain names and the Internet Protocol (IP) addresses associated with them. In simple terms, it is a tool that can …
Downtime reduced, data recovered by utilizing an Experts Exchange Business Account Challenge The United States Marine Corps employs more than 200,000 active-duty Marines with operations in four continents, all requiring complex networking system…
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…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

634 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