Jump to content

Need help with REG ADD & REG DELETE Command


ceez

Recommended Posts

Hello fellow MSFN'ers...

I am trying to create a single script that will copy a bmp file to c:\windows and then enters that file name into the registry to make it the wallpaper of the log on screen (logon classic mode)

===========

copy c:\BA1280.bmp c:\windows\ <-obvious, copy bmp to c:\windows\

reg delete "HKU\.DEFAULT\Control Panel\Desktop" /v Wallpaper <- deletes the wallpaper key

reg add "HKU\.DEFAULT\Control Panel\Desktop" /v Wallpaper /d BA1280.bmp <- adds bmp file name to wallpaper key

exit

===========

The problem I am having is with the confirmation prompt, it asks if I want to delete the key or if I want to override the bmp image that's already there.

I've tried the good ol' /y like when you're trying to use the copy command and want to suppress prompting to confirm, even tried -y... this doesnt work either! :(

Even if you do a REG ADD /? or REG DELETE /? it does not give you an option to suppress prompting.

I need it to suppress because eventually this will go in a group policy which will be deployed to all the workstations in the office, I dont need people being asked if they want to override stuff.

Thanks for your help,

Ceez

:thumbup

Oh silly me, I finally googled the right keywords.

the switch is: /f <- f = force, duh!

Thanks anyways and hope that someone at least learned something! :)

Edited by ceez
Link to comment
Share on other sites


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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...