Click here to Skip to main content
15,896,201 members
Home / Discussions / C#
   

C#

 
GeneralRe: Installing a C# application programmatically … Pin
Xaverian27-Dec-06 6:52
Xaverian27-Dec-06 6:52 
GeneralRe: Installing a C# application programmatically … Pin
Nader Elshehabi27-Dec-06 7:11
Nader Elshehabi27-Dec-06 7:11 
GeneralRe: Installing a C# application programmatically … Pin
Xaverian27-Dec-06 7:34
Xaverian27-Dec-06 7:34 
GeneralRe: Installing a C# application programmatically … Pin
Nader Elshehabi27-Dec-06 7:59
Nader Elshehabi27-Dec-06 7:59 
GeneralRe: Installing a C# application programmatically … Pin
Xaverian27-Dec-06 8:21
Xaverian27-Dec-06 8:21 
GeneralRe: Installing a C# application programmatically Pin
Nader Elshehabi27-Dec-06 8:27
Nader Elshehabi27-Dec-06 8:27 
GeneralRe: Installing a C# application programmatically Pin
Xaverian27-Dec-06 8:42
Xaverian27-Dec-06 8:42 
GeneralRe: Installing a C# application programmatically Pin
Nader Elshehabi27-Dec-06 9:10
Nader Elshehabi27-Dec-06 9:10 
Alright. I'm going with you to the end.
There is a registry key in windows that you got to change. The key is "HKEY_CURRENT_USER\Control Panel\Desktop". Inside it there is a value called "SCRNSAVE.EXE". If this value doesn't exist you should create it, if it does you should give it the value "C:\windows\MyFile.scr". To do that while you install your program you have to do a custom action that is done while installing the software.
1- Create the setup project in the same solution as your screen saver solution
2- Add the primary output of your screensaver project to the windows folder you create in the file system panel
3- Right click on the setup project's name => view => custom actions
4- Add a new custom action and choose the primary output of your screensaver project
5- In the screensaver project add a new item => installer class
6- In the Installer1.cs overide the Install() method.
7- In that method alter the above mentioned registry key
8- Don't hardcode the text "C:\windows" as the path. Rather use
Directory.GetParent(Environment.SpecialFolder.System);

Maybe they installed windows in another partition than C.

PS.
I've discovered a much easier way to install your screensaver. Just give your relatives the scr file and tell them to Right click on it => Install. This will directly install it and set it as the default screen saver. Also tell them not to delete the scr file BTW, as it's not copied to the windows directory.

RegardsRose | [Rose]

GeneralRe: Installing a C# application programmatically Pin
Xaverian27-Dec-06 9:39
Xaverian27-Dec-06 9:39 
GeneralRe: Installing a C# application programmatically Pin
Nader Elshehabi27-Dec-06 9:46
Nader Elshehabi27-Dec-06 9:46 
GeneralRe: Installing a C# application programmatically Pin
Xaverian27-Dec-06 11:53
Xaverian27-Dec-06 11:53 
GeneralRe: Installing a C# application programmatically Pin
Nader Elshehabi27-Dec-06 20:13
Nader Elshehabi27-Dec-06 20:13 
GeneralRe: Installing a C# application programmatically Pin
Xaverian28-Dec-06 3:57
Xaverian28-Dec-06 3:57 
QuestionExporting DataGrid to Excel Pin
pssuresh27-Dec-06 3:50
pssuresh27-Dec-06 3:50 
AnswerRe: Exporting DataGrid to Excel Pin
Nader Elshehabi27-Dec-06 6:47
Nader Elshehabi27-Dec-06 6:47 
AnswerRe: Exporting DataGrid to Excel Pin
ednrgc28-Dec-06 6:30
ednrgc28-Dec-06 6:30 
QuestionopenFileDialog problem Pin
CodeItWell27-Dec-06 3:32
CodeItWell27-Dec-06 3:32 
AnswerRe: openFileDialog problem Pin
Paul Lyons27-Dec-06 3:58
Paul Lyons27-Dec-06 3:58 
AnswerRe: openFileDialog problem Pin
gnadeem27-Dec-06 4:00
gnadeem27-Dec-06 4:00 
GeneralRe: openFileDialog problem Pin
Dave Kreskowiak27-Dec-06 5:09
mveDave Kreskowiak27-Dec-06 5:09 
GeneralRe: openFileDialog problem Pin
gnadeem27-Dec-06 11:20
gnadeem27-Dec-06 11:20 
GeneralRe: openFileDialog problem Pin
ednrgc28-Dec-06 6:31
ednrgc28-Dec-06 6:31 
QuestionHow to make use of an API Pin
rockyl27-Dec-06 2:33
rockyl27-Dec-06 2:33 
AnswerRe: How to make use of an API Pin
Niiiissssshhhhhuuuuu27-Dec-06 2:39
Niiiissssshhhhhuuuuu27-Dec-06 2:39 
GeneralRe: How to make use of an API Pin
rockyl27-Dec-06 4:23
rockyl27-Dec-06 4:23 

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.