Solved

%username% in win98

Posted on 2000-05-12
9
364 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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 …
Greetings, Experts! First let me state that this website is top notch. I thoroughly enjoy the community that is shared here; those seeking help and those willing to sacrifice their time to help. It is fantastic. I am writing this article at th…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

776 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