[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How to run profile coping batch file before the profile loads in XP and 2000.

Posted on 2007-03-29
10
Medium Priority
?
459 Views
Last Modified: 2013-12-04
I have batch file that will take user input – login name -  and copy files from profile <loginname> to profile <loginname.machinename>.
The question is – how can I run that batch file before the profile <loginname> loads?
I tried including it in wininit.ini -  no go.
Win.ini – also no go -  it loads after the profile is loaded.

User input is important in order to specify the correct source profile.
I need to roll it out on over 500 workstations with XP professional and win2000 operating systems.
I can't trust users to create 3-rd profile and initiate copy this way.
All help and suggestions are greatly appreciated.


0
Comment
Question by:lescluster
[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
10 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 18817100
I don't believe you'll be able to, and grab input from the user, because the credential context will be that of the SYSTEM account, not a user.  The user won't be able to respond to those prompts until Windows has logged them on..
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 18817115
If you need user input, then it needs to be run after login.

I would do it in a batch file and use the Username variable, and have it copy the profile.
At next login, it should be available.

You may have issues with security depedning if the user is a local admin or not.

You might need to give a little mre detail on what you are trying to accomplish in general, and see if there is a better way.

I hope this helps !
0
 
LVL 1

Expert Comment

by:Phamunda
ID: 18817214
Yeah, a little more information would be useful.  At first glance, this looks like it would be a great opportunity to use roaming/networked profiles.
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 

Author Comment

by:lescluster
ID: 18817527
OK -  sorry for being so brief and thanks for fast advice. Here is the full scenario:
I had over 500 workstations under domain. Now we are getting away from domain. All users have profiles created on their workstations with the name in the form of username.machinename. The new profiles are empty - or at least they should be empty - meaning just a basic template stuff in there. SO -  when the user logs in with the new login (username.machinename) I would like to have their previous profile that they had when they were under the domain transfered to the new (user.machinename) profile.
Now - the user input issue -  just in case their old profile was not named username but let's say username.domainname - I would like them to specify that for  me before I do the copy. So I copy the right stuff. Perhaps there is other way to detect which profile should be copied -  I am not sure if there is a way to detect the size of the profile (the largest would be the one I want) or some other variable that can be used for the purpose of detecting the correct profile to copy.   I am even willing to abandon the copy process for users that have profiles other then username (presumably previous) and username.machinename (current) profiles on their workstation - if I have to get rid of user input to make it work. I will take care of those manually. Also - before I overwrite the new profile data (username.machinename) I would like to create a copy of that profile and store it on that workstation just in case for some sick reason the profile username.machinename is the loaded profile. Want to avoid destroying it just in case.
I am working primarily in web development so my skills in MS DOS are  somewhat limited -  I would appreciate if you can be as specific as possible in your comments. Thanks much in advance.
 
0
 

Author Comment

by:lescluster
ID: 18817557
One more thing -  users have administrative rights.
0
 

Author Comment

by:lescluster
ID: 18818498
Thanks -  looks like the
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Windows/2000/Q_21113845.html
is about what I am trying to accomplish. However - Jdeclue says there "Now you have the username available to a script running in the computers startup script, which uses the local system authority to copuy username over username.domain."  Question is - what does he mean by "computers startup script"? How is that going to work if the profile is in use -  exclusive lock will not allow copy to be done successfully.
Any ideas?
0
 
LVL 63

Expert Comment

by:SysExpert
ID: 18818752
I think that you should do this in a logout script via GPO.  That may work.

You are going to have to do some testing.

0
 

Author Comment

by:lescluster
ID: 18819583
Looks like I found the solution -  will create batch file to get the user name and machine name- set it up on the machine. Then run the copy script that will read that file -  to run the copy script I will use PSExsec : http://www.microsoft.com/technet/sysinternals/utilities/psexec.mspx 

Slight issue that results from my limited knowledge of batch scripting -  I need to echo out the profile directory size  to the netshare location -  can someone help me with teh script for that -  if possible?

Thanks
0
 
LVL 63

Accepted Solution

by:
SysExpert earned 1500 total points
ID: 18819681
use the Dir command.

Post a new Q in the MSDOS TA.

I hope this helps !
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam® is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

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

I don't know if many of you have made the great mistake of using the Cisco Thin Client model with the management software VXC. If you have then you are probably more then familiar with the incredibly clunky interface, the numerous work arounds, and …
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

649 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