DosTips.com

A Forum all about DOS Batch
It is currently 04 Dec 2016 12:20

All times are UTC-06:00




Post new topic  Reply to topic  [ 16 posts ]  Go to page 1 2 Next
Author Message
PostPosted: 28 Feb 2012 13:48 
Offline

Joined: 28 Feb 2012 13:36
Posts: 7
i need to 5 files to all user profile.
its very easy for 2,3 users but in my office maximum of the PCs has more than 20 users profile.
IS there any way to do with batch script.


Top
   
PostPosted: 28 Feb 2012 14:43 
Offline
Expert

Joined: 23 Dec 2011 13:59
Posts: 3369
I think what you meant to say was EVERY user profile. The All Users profile would be just the one profile and that of course would be easy to do. Why not just use the All Users profile instead of copying it to every user profile on the computer. What happens when a new person logs onto the computer. They wouldn't have the file you copied to everyone's profile individually.


Top
   
PostPosted: 28 Feb 2012 23:57 
Offline

Joined: 28 Feb 2012 13:36
Posts: 7
yes you are right,
but the thing is more than 20 profile created. if you put any files in all users, it wont go to the already created profile.


Top
   
PostPosted: 29 Feb 2012 02:31 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 6033
The files in All Users are available for any profile, new or old.


Top
   
PostPosted: 29 Feb 2012 02:45 
Offline

Joined: 28 Feb 2012 13:36
Posts: 7
Tell me the solution for this situation…
An old PC already has 20 profiles in the PC. I want to put new file in all profiles desktop.
If I put the file into default profile desktop. Will it come?


Top
   
PostPosted: 29 Feb 2012 02:59 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 6033
If you put it in the All Users desktop then it should appear on every users profile.

Test it yourself on your PC.

Press F5 to refresh your desktop when it is in focus, or reboot.


Top
   
PostPosted: 29 Feb 2012 03:21 
Offline

Joined: 28 Feb 2012 13:36
Posts: 7
i already tested everything.
windows takes all files the first time profile creation. after create the profile it wont.

thats what i asked the script, it is easy to do with the script.
i am new to batch. could you help anyone.

read the following line

The new profile is in fact created by making a copy of a special profile, named Default User. It is permissible to modify this Default User profile (within certain guidelines) so as to provide a customised working environment for each new user. Modification of the Default User profile should ideally be done from new, prior to any users logging-on to the computer;if a user has already logged on once or more, the Default Profile has no effect whatsoever for that user.


Top
   
PostPosted: 29 Feb 2012 03:37 
Offline
Expert

Joined: 04 Oct 2008 09:49
Posts: 357
I suggest a total rethink would give an easier solution, and even be essential.

Proposal :-
On each P.C. make available only one instance that is write protected and in a location accessible to all.
This could be a copy of your master file, or even a link via the network so that when you update the central system master file then all users on all P.C.s are instantly up to date.

Benefits :-
1.
No maintenance effort - even when new users and profiles are added.
2.
Write Protection against one user damaging a common resource and affecting others - accidentally or otherwise.

N.B.
The users can make editable copies to their own profiles if they need to.


Top
   
PostPosted: 29 Feb 2012 03:39 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 6033
All Users profile. Try this and check your desktop, if you are using XP. You will need to adjust it for Win7.

Code: Select all
@echo off
echo abc>"c:\Documents and Settings\All Users\Desktop\Testing file.txt"


Last edited by foxidrive on 29 Feb 2012 03:44, edited 1 time in total.

Top
   
PostPosted: 29 Feb 2012 03:41 
Offline

Joined: 28 Feb 2012 13:36
Posts: 7
could you explain this briefly


Top
   
PostPosted: 29 Feb 2012 03:45 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 6033
Are you using Win7?


Top
   
PostPosted: 29 Feb 2012 03:48 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 6033
Code: Select all
@echo off
echo abc>"%ALLUSERSPROFILE%\Desktop\Testing file.txt"



This should work on all NT flavours of Windows.


Top
   
PostPosted: 29 Feb 2012 03:56 
Offline

Joined: 28 Feb 2012 13:36
Posts: 7
thanks for your replay.

i am using windows 7. i run this script, Don't work for me


Top
   
PostPosted: 29 Feb 2012 04:00 
Offline
Expert

Joined: 10 Feb 2012 02:20
Posts: 6033
foxidrive wrote:
Code: Select all
@echo off
echo abc>"%ALLUSERSPROFILE%\Desktop\Testing file.txt"



This should work on all NT flavours of Windows.



You have to run it as administrator.


Top
   
PostPosted: 29 Feb 2012 07:10 
Offline
Expert

Joined: 23 Dec 2011 13:59
Posts: 3369
brightrif wrote:
i already tested everything.
windows takes all files the first time profile creation. after create the profile it wont.

thats what i asked the script, it is easy to do with the script.
i am new to batch. could you help anyone.

read the following line

The new profile is in fact created by making a copy of a special profile, named Default User. It is permissible to modify this Default User profile (within certain guidelines) so as to provide a customised working environment for each new user. Modification of the Default User profile should ideally be done from new, prior to any users logging-on to the computer;if a user has already logged on once or more, the Default Profile has no effect whatsoever for that user.

You are confusing the Default User Profile with the All Users Profile. The default is used to create new users but the All users profile is used to populate something for everyone on the computer.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 16 posts ]  Go to page 1 2 Next

All times are UTC-06:00


Who is online

Users browsing this forum: dosbatch, jfl, TTwrs1, Yahoo [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited