Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help writing a little cmd script. 3

Status
Not open for further replies.

SteveAudus

Technical User
Oct 4, 2001
409
GB
Could any of your clever people help me write a little program that would help out myself and my technicians.

We use 2 cmd line codes over and over again, on our NT workstations when we haven't got access to our 2K server,
and I was wondering if it possible to write a script to make their use easier.

I am not a programmer myself, and I really need some help.

The 2 lines are
net user "user name" /domain
to check user details
and
net user "user name" newpassword /domain
to change a user's password.

maybe there is a program out there that does it already.

but just a script that asks for a user name,
then asks if you'd like to change to password,
if yes then you type the password in.
Simple, but I don't know where to start.

Thank you for any help,

Steve Audus
Chaucer School
Sheffield, UK
 
BUT are these user accounts, Domain accounts or Local accounts -- ie, do users log into the local machine or into a domain? From your post it sounds like everyone has a local account (or at least a local profile -- you can still log into a domain and not have a roaming profile) and this is why your GPO will not work -- it doesn't delete local profiles...only roaming profiles.

Still don't understand...how does one get the shortcuts contained in the Sdesktop/Pdesktop profiles if they log in as themselves?

-Drew
 
Hi chaps...

Steve... have a look here, and let me know what you think:


or

I actually had problems trying to downlaod from work... think Firewall settings in place... but if you go to the root, and right click on ua2002.exe, you can save target... I tested this and it seems to work. You can run it either at the command prompt, or double-click...
I hope it works as you wished! I have actually learned some new stuff because of this venture (like how to run external apps from within a C# program!) so thanks!
The source code, if anyone is interested can also be found here...
Will

PS - I will trust no one will go to the root site at it is ancient, and nothing on it is actually happening as was planned a couple of years ago... it is due for a major face-lift soon though!

[2thumbsup]
 
OH!!! I forgot... in order to run the program, you will have to have .NET framework installed on the host machine. It's part of windows update for W2K, W9x/ME, XP, and NT, so you most likely already have this... if not, what are you waiting for?? [wink]

Will
 
Hi dmanlam the user gets the desk top and short cuts through group policy. The desktop redirection tool I tell it to look for c:/pdesktop for pupils and sdesktop for the folder redirection for staff the folder fedirection directs the my docs back to the server to a folder Pupils or staff where their work is saved.The background is set in GP as well green pupil red staff. The short cuts then link to the progs on the local machine. In this way staff and pupils can be given different desktops and applications. Bt thier is a folder placed in the local drive which holds start menu cookies and favorites and its this i want to get rid of .. John. If I only knew today what I will know tomorrow.
 
Hi guys thanks for all your help in the last week/ half term so am off for a week on the canals. No internet on the canal boat and I will have a rest from Network pressures. Will look back in next week. John [pc3] If I only knew today what I will know tomorrow.
 
Hi Steve,

You are most welcome... in doing this, I thought it would be interesting to do an app that allows you to do all of the net.exe commands in one app... I'll probably make it a windows app, though. There are certain limitations of using the commandline, such as replacing the new password with asterisks, which is why I did a separate windows form.
feel free to check back to that web address above from time to time, as I will post more programs as I write them.

Take care,

Will
 
I have set up the printers using a batch file However I cannot seem to write a new one and add to my other group of users I keep getting an error 32? any ideas..... If I only knew today what I will know tomorrow.
 
Note on the printer script:
Make sure that the printer name has no spaces ie PRINTER1 not PRINTER 1 (when you name the printer on the print server, domain server) or you will get an error and the script will fail. :)


Some lead, some follow....I just Hope!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top