0

I wanted to automate this process: http://www.blogsdna.com/2698/you-can-customize-windows-7-logon-background-officially.htm

Registery was no problem.

But when i wanted to create the backgrounds folder in Windows\System32\oobe\info, it simply didn't work. It just won't create the dir whatever i try.

I assume it's something with unauthorized access? But even with UAC turned of, I still can't create the folder.

Anyone has an idea how that does come?

2 Answers2

1

Just go in with Windows Explorer and change the permissions on the folder where you try to create your sub folder to give your user account write permssions.

Hans Olsson
  • 54,199
  • 15
  • 94
  • 116
  • Could you give this permissions from within .net? – Elias Lecomte Nov 05 '10 at 15:05
  • @Elias: In theory yes, just look at FileSystemSecurity.AddAccessRule (http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.filesystemsecurity.addaccessrule.aspx). But in practice that would probably end up being the same thing in that your app would need to have permission to give you permission to the folder. Try to run your app as an Admin (either using RunAs or via a manifest as in this question http://stackoverflow.com/questions/2737196/setting-uac-settings-of-a-file-in-c) and see if that works. – Hans Olsson Nov 05 '10 at 16:05
0

You need to request administration rights for the application. changing the rights for the Windows dir is bad because it has system files. Google it.

To test right click the program and click run as admin. In vb there is an settings xml you set permissions in, I assume there will be a way in c#

Will03uk
  • 3,346
  • 8
  • 34
  • 40