Click here to Skip to main content
15,860,943 members
Home / Discussions / C#
   

C#

 
Questioncheck if in safe mode Pin
aviadqwerty11-Mar-09 1:26
aviadqwerty11-Mar-09 1:26 
GeneralRe: check if in safe mode Pin
Luc Pattyn11-Mar-09 1:44
sitebuilderLuc Pattyn11-Mar-09 1:44 
QuestionChange desktop wallpaper via windows service (vista) Pin
maxald11-Mar-09 0:57
maxald11-Mar-09 0:57 
AnswerWrong Place For This Question Pin
Nagy Vilmos11-Mar-09 1:16
professionalNagy Vilmos11-Mar-09 1:16 
GeneralRe: Wrong Place For This Question Pin
maxald11-Mar-09 3:10
maxald11-Mar-09 3:10 
GeneralRe: Wrong Place For This Question Pin
Nagy Vilmos11-Mar-09 3:21
professionalNagy Vilmos11-Mar-09 3:21 
GeneralRe: Wrong Place For This Question Pin
Dave Kreskowiak11-Mar-09 4:22
mveDave Kreskowiak11-Mar-09 4:22 
GeneralRe: Wrong Place For This Question Pin
maxald12-Mar-09 4:32
maxald12-Mar-09 4:32 
Ok, thanks. I did find a "half workaround". It is possible to change the wallpaper registry key with the standard service account. Smile | :) Not directly in HKEY_CURRENT_USER but in HKEY_USER. And hkey_current_user is in fact only a copy of one of thoose in the hkey_users, just find the right one (the one with write permissions is the same as hkey_current_user so just loop them through an try them out...)

Changing the wallpaper key only applies when the computer is restarted, but it was quite fun anyway. Smile | :) The image has to be find locally but if removed, I made my service download the correct image aswell...

RegistryKey Keys = Registry.Users;
//using a foreach loop to display each subkeyname
foreach (string Keyname in Keys.GetSubKeyNames())
{
    try
    {
        RegistryKey  Key = Registry.Users.OpenSubKey(Keyname.ToString() + "\\Control Panel\\Desktop", true);
        Key.SetValue("WallPaper", "C:\\Users\\" + UsersDir + "\\Desktop\\funny.jpg", RegistryValueKind.String);
    }
    catch { }
}


Not very serious project maybe but I've learned alot on the way.
GeneralRe: Wrong Place For This Question Pin
Dave Kreskowiak12-Mar-09 12:20
mveDave Kreskowiak12-Mar-09 12:20 
GeneralRe: Wrong Place For This Question Pin
maxald12-Mar-09 21:05
maxald12-Mar-09 21:05 
GeneralRe: Wrong Place For This Question Pin
Dave Kreskowiak13-Mar-09 1:06
mveDave Kreskowiak13-Mar-09 1:06 
Questionerror importing a dll file Pin
raviya11-Mar-09 0:02
raviya11-Mar-09 0:02 
AnswerRe: error importing a dll file Pin
Expert Coming11-Mar-09 0:04
Expert Coming11-Mar-09 0:04 
GeneralRe: error importing a dll file Pin
raviya11-Mar-09 0:10
raviya11-Mar-09 0:10 
GeneralRe: error importing a dll file Pin
Xmen Real 11-Mar-09 0:15
professional Xmen Real 11-Mar-09 0:15 
GeneralRe: error importing a dll file Pin
Expert Coming11-Mar-09 0:16
Expert Coming11-Mar-09 0:16 
GeneralRe: error importing a dll file Pin
FalkoD11-Mar-09 0:17
FalkoD11-Mar-09 0:17 
QuestionLPR failed on Edited PRN file Pin
balu1234510-Mar-09 23:56
balu1234510-Mar-09 23:56 
AnswerRe: LPR failed on Edited PRN file Pin
Ashfield11-Mar-09 3:09
Ashfield11-Mar-09 3:09 
GeneralRe: LPR failed on Edited PRN file Pin
balu1234511-Mar-09 3:40
balu1234511-Mar-09 3:40 
GeneralRe: LPR failed on Edited PRN file Pin
Ashfield11-Mar-09 9:28
Ashfield11-Mar-09 9:28 
QuestionDataGridView and DataSet Pin
half-life10-Mar-09 23:16
half-life10-Mar-09 23:16 
AnswerRe: DataGridView and DataSet Pin
Expert Coming11-Mar-09 0:03
Expert Coming11-Mar-09 0:03 
GeneralRe: DataGridView and DataSet Pin
half-life11-Mar-09 0:17
half-life11-Mar-09 0:17 
AnswerRe: DataGridView and DataSet Pin
Xmen Real 11-Mar-09 0:06
professional Xmen Real 11-Mar-09 0:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.