Link to home
Create AccountLog in
Avatar of Butch Smith
Butch SmithFlag for United States of America

asked on

group policy logon script + running it silent

Using group policy I have a logon script under user config.  The script runs a batch file with the following parameters:

regedit.exe /S

The problem is the batch file runs when the user logs in but it asks them to run and will not run silently.  What am I doing wrong.  I will attach the batch file converted to a txt file for review.

Thanks
Fleemate.txt
Avatar of JohnGerhardt
JohnGerhardt
Flag of Switzerland image

I not sure I quite understand..
In order for the reg import to run silently...
  • The user must be able to edit the registry keys that youa re wanting the create / edit / delete
  • You need to reference to a .reg file with the correct path
If you get any of this wrong then the script is going to show the error to users
So basiclally the file that you have attached would need an extension of .reg and the the batch file would reference to it like:
regedit /s fleetmate.reg
This should then work... Can you test running the batch file your self on the machine to confirm that it runs correctly under an administrator account, that way we can rule permissions out...
PS. I requested some attention for you, you really dont want to leave the filenname ewith your license details live on EE
Avatar of Butch Smith

ASKER

Maybe I stated this incorrectly.  I have a file called Fleetmate.reg (which is the file I attached, just changed the ext to txt so you could view it)  Under goup policy logon scripts I have this path to this file and in the script parameters I have: regedit.exe /S

When a users logs in the script /reg file runs correctly because there are no errors, but it asks the user if they want to run it YES or NO.  I don't want the user to have the option, thought it could just run in the background silently.  please see file I attached.
script.doc
Ok,
I can't see anything in the doc file..
If the batch file contains:
regedit /s regfile.reg
then it shouldnt prompt you...
The doc file was a snap shot of the settings in group policy.  my settings look like this:

script name: fleetmate.reg

script parameters: regedit.exe /s

the script name basically points to where the file is located and since I have added it to a script logon folder it makes it very easy to point to the file.  I'm not sure what I should have the parameters set to?  Like I said it runs correctly, but asks the users and does not run silently.

Is your suggestion to change the script parameters to read regedit /s fleetmate.reg  ???
Can you create a normal pic of your settings and upload that (not in a word document). I am a little confused on how you are doing it..
How about pdf.
script.pdf
Ahhh,
Thats better..! Now I can see what is wrong..
You have the two things the wrong way round.. At the moment your are running
  • Fleetmate.reg regedit /s
As regedit /s is not a parameter for the file it is just ignored.. Meaning that the users have to accept it...
I would recommend creating a batch file with this in it:
regedit /s Fleetmate.reg
then all you need to do is put this batch file and the reg file into the same GPO logon scripts folder...
Then add a Logon script like before and type the name of the batch file that you have just created.. No parameters needed...
I did what you suggested and it still asks the user to click YES to install.  In my batch file it says:
regedit /s fleetmate.reg

Do I need to change the reg file at all?  I also have a space between the regedit and /s which I believe is correct.  
Yep you should have spaces in there..
Try creating the batch file and then running it locally on a machine to confirm that you have it right..
Can you give a screenshot of what you now have for the logon script section of the AD...
I presume that you delete the old script else you would be getting the same error.. Also you need to make sure thet all logon scripts have propogated to all DCs else your clients coudl be using old info.. Run "rsop.msc" from RUN in order to work out if the things that are running are waht you expect...
here is the settings, I will try to run it locally and let you know what it does.
fleetmatereg.pdf
That looks fine...
I will have to try running it on my computer later because I just realized I do not have the program installed on it.  But as far as you can see it all looks good?  The users have limited rights, but I cant imagine user rights would have anything to do with the install.  If I reply to this tomorrow will you still get it?  Thanks for all you help.
ASKER CERTIFIED SOLUTION
Avatar of JohnGerhardt
JohnGerhardt
Flag of Switzerland image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
It works now... must have taken a little while for the gp update to take even though I ran a command to force the update.

Thanks for all your help
Thanks for all your help, see my last comment.  IT WORKS!