Avatar of Butch Smith
Butch Smith
Flag 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
Project ManagementWindows BatchVB Script

Avatar of undefined
Last Comment
Butch Smith

8/22/2022 - Mon
JohnGerhardt

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
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
JohnGerhardt

Ok,
I can't see anything in the doc file..
If the batch file contains:
regedit /s regfile.reg
then it shouldnt prompt you...
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Butch Smith

ASKER
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  ???
JohnGerhardt

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..
Butch Smith

ASKER
How about pdf.
script.pdf
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
JohnGerhardt

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...
Butch Smith

ASKER
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

Butch Smith

ASKER
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.  
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
JohnGerhardt

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...
Butch Smith

ASKER
here is the settings, I will try to run it locally and let you know what it does.
fleetmatereg.pdf
JohnGerhardt

That looks fine...
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Butch Smith

ASKER
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
JohnGerhardt

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Butch Smith

ASKER
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
Butch Smith

ASKER
Thanks for all your help, see my last comment.  IT WORKS!
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy