Discussion Locked

Script question...

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have alot of utility programs I would like to run, possibly in a script, but I don't know how to do it. Here is an example of some things I would like to do in my script:

delprof.exe /q /i
net time \\primary_server /Set /y
del tree c:\temp
md c:\temp
**and possibly updates to service packs

But the problem is that when I put these commands into users logon scripts (made in the form of .BAT), the users don't have enough rights to execute them. I don't want to give them admin. privliedges. I have tried using SU but I couldn't get it working. I want to be able to apply this WITHOUT going around and manually doing something to the computers. I want it all though scripting. Next, I tried using a service "instsrv". It installedthe service (I still had to log on as administrator) to a batch file, but the service wouldn't start becuase it said it was invalid or something like that. All I did was make a service that pointed to a batch file in the C:\temp directory with the commands above. Anyways, the users don't have enough rights to use the "net start" command! It wouldn't start in automatic and I would also like to be able to update the file that the service will be using though a script. It would even be better if I could use a service that pointed to a file in \\primary_server\NETLOGON. Any other ideas/suggestions would be GREATLY APPRECIATED!!! I HAVE BEEN WORKING ON THIS FOR OVER A WEEK AND AM GOING CCCRRRAAAZZZYYY!!!!!

4 replies

by valachi

First of all, I would not mix the maintenance commands with the logon script commands. I can't tell you how you can solve the permission problem since you don't mention anything about the permissions that you have set. Still, I would recommend that you check the permissions over the NETLOGON share, over the Profiles dir, and also don't forget to give to the System account FULL Control. Oh, and btw - you cannot install a batch file as a service - only binaries, .exe files.

by thomasjhancock

They have access to the file, but it won't run becuase they need administrative priv. to delete the other peoples profiles. I want to put it into a system task so it runs under the system.

by deltree

Sounds like the NTFS permissions on delprof & deltree do not include your users. locate the folder where these files live, and verify permissions on both the directory and the files.
If this doesn't point to the cause then you might try to put thefiles into the same directory your script runs from. The files will inherit the permissions on the scripts folder and the users should be able to login.

by thomasjhancock

They have access to the file, but it won't run becuase they need administrative priv. to delete the other peoples profiles. I want to put it into a system task so it runs under the system.

This discussion is closed to new replies.