How to write Windows registry script?

Access denied, running script on log in?

  • I have a simple log on script that obviously runs on user login. My problem being they don't have permission to mess with the registry, and for good reason. But I need this information to be in HKCU which needs to be executed AFTER login right? How can I do this then? Is it possible to evelate the script's rights without putting the data in the wrong HKCU? Would this still work if ran as a startup script that runs BEFORE the login prompt? It doesn't seem like it can, but it also seems like it needs to lol. Help! ;) @echo off REG ADD "HKCU\Software\Microsoft\Windows\Current… /V Wallpaper /T REG_SZ /F /D "C:\image.jpg" REG ADD "HKCU\Control Panel\Desktop" /V Wallpaper /T REG_SZ /F /D "C:\image.jpg" REG ADD "HKCU\Control Panel\Desktop" /V WallpaperStyle /T REG_SZ /F /D 2 REG ADD "HKCU\Control Panel\Desktop" /V TileWallpaper /T REG_SZ /F /D 0 Exit

  • Answer:

    If it's a user profile config, do it through Active directory. Check out page on 'mandatory' profile. Also look at ad policy for wallpaper, etc. It sounds like you need a computer script..rather than a user logon script. You could also use a 'task' that runs at logon...to run in a 'specific' priviledged user context.

meltings... at Yahoo! Answers Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.