Jump to content

Recommended Posts

Posted

Hi, I have a .reg file which is in Logon scripts and it applys the change for what i want etc but it asks if you want to apply the change yes or no How can i make it so it automatically says yes without prompting you.

 

Thanks Steven.

Posted

Hi there, I've done this before to merge a registry change for users' keyboard layout. Not sure how your script is structured, but mine was tagged onto the bottom of the user's logon script as follows:

 

%systemroot%\regedit.exe /s \\\\.reg

 

the /s after "regedit.exe" makes it a silent merge so the user doesn't have to intervene.

 

hope that helps...let me know,

 

Arge

Posted

I do quite a bit of registry manipulation for our workstations - but I tend to use the RegWrite function in AutoIT:

 

RegWrite ( "keyname" [,"valuename", "type", value] )

Posted
That script 'theme' which i uploaded is a .reg and thats just in startup scripts if you could download that and then save it as a .reg and then run it till it doesnt ask to apply the setting then that would be really good, Thanks steven.
Posted
ok, so rather than do it locally you could make the change via the server. when the user logs on, do they run a logon script from the server? if so is it a .bat file?
Posted
Nope they dont the only .bat is mapping network drives the other is that .reg which works only problem is it asks to apply yes/no etc
Posted

right. let me explain a bit more about how mine worked...

 

when the user logs on, they run a .bat file which is stored on the server in the sysvol folder and connects their network drives and printers. this .bat file is a property of their user account in Active Directory. I therefore added the line

 

%systemroot%\regedit.exe /s \\\\.reg

 

to the user's logon script (.bat file) and shared the registry file from a folder on the network that everyone had access to. The result being that when the .bat is run at logon it references the .reg file and makes the registry change silently.

 

does this sound something you could replicate on your network?

 

i'm still working on your problem btw

Posted

ok, this works: (its not the nicest solution, but it does work)

 

create a shared folder somewhere on your users machine. drop your registry file into that folder. (we'll assume your computer is called stephen and your share called silvertheme)

 

check you can access the folder from the run command by typing \\stephen\silvertheme

 

if so you'll see you .reg file.

 

in the users startup folder create a .bat file with the line

 

%systemroot%\regedit.exe /s \\stephen\silvertheme\theme.reg

 

log off and back on again a couple of times and it should work.

 

its a little crude, but i've tested it a few times now and it works.

Posted

When i run the command it says: UNC paths are not supported defaulting to windows directory, also how can i get this change accross to all machines?

 

Thanks a lot for the help as well.

Posted

The message about UNC paths is informational - it's not an error and you can ignore it.

 

As I understand it, you've got a script which is mapping drives - that presumably has something like:

 

net use X: \\server\share1
net use Q: \\server\share2

 

so what you want to do is add to that so it looks like this:

 

net use X: \\server\share1
net use Q: \\server\share2
regedit /s \\server\share\silver.reg

 

You need to find a safe place to put the silver.reg file - a possibility is the netlogon share and you can access this by putting:

regedit /s %logonserver%\netlogon\silver.reg

 

What I think you've done is put the .reg file in the policies section of your sysvol share (you get there when you create a group policy to specify a logon script) and just say that the .reg is the script. This will work but there's no way you can stop the prompt - regedit runs in "normal" mode and isn't silent.

 

You could specify the logon program to be regedit /s silver.reg but the problem is that regedit won't know where to look for the .reg file - this is why it's easier to put it in a defined location (like netlogon) and call it from a batch file

Posted

regarding the change across the entire network, thats why i was asking how your network was set up. if your logon scripts are running from AD on the server then you make the reference to the .reg file in that script(s) and share the .reg file from the server. if your doing it locally you'll have to either visit each machine or remote into them and drag the files into the required folders.

 

as for your error message, attach your .bat file as txt like you did with the .reg file and i'll have a look...

  • 11 months later...
Posted
Hi there, I've done this before to merge a registry change for users' keyboard layout. Not sure how your script is structured, but mine was tagged onto the bottom of the user's logon script as follows:

 

%systemroot%\regedit.exe /s \\\\.reg

 

the /s after "regedit.exe" makes it a silent merge so the user doesn't have to intervene.

 

hope that helps...let me know,

 

Arge

 

Hmm,

I need to merge a registry fragment at logon but my users do ot have permission to run scripts so it gets denied? Is there a way to authenticate somehow just for a script?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...