![]() |
|
[C#] [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ (/showthread.php?tid=5752367) |
[Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - gigajew - Nov 13, 2017 Here's a new installation class I wrote. It supports installing as hidden or normal, and a really great thing about it, is that you can natively pass string paths with environment variables, such as: %appdata%\file.exe which is a thing a lot of crypter-developers may find useful. Example usage is in the paste, but here it is too: Code // normal, passed with app titleRE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - cocaine_monkey - Nov 14, 2017 As im learning i would like to hear your opinion on get set properties, in installersettings why you choose to use them like that? do you use them always like that? i tend to use them only if i need some checks in there or i want to limit it to just get only. Also why use private then public property on that class? wouldnt public get set work just fine? Is it stupid to create get set functions like in c++? i think c++ way looks more sexy but is it stupid? RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - gigajew - Nov 14, 2017 (Nov 14, 2017 05:20 PM)cocaine_monkey Wrote: As im learning i would like to hear your opinion on get set properties, in installersettings why you choose to use them like that? do you use them always like that? i tend to use them only if i need some checks in there or i want to limit it to just get only You used to always have to do it that way. I keep doing it for backwards compability and because of habit RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - cocaine_monkey - Nov 14, 2017 (Nov 14, 2017 05:22 PM)gigajew Wrote: You used to always have to do it that way. I keep doing it for backwards compability and because of habitOk yes its new feature also i edited my post if you could share your opinion RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - gigajew - Nov 14, 2017 (Nov 14, 2017 05:27 PM)cocaine_monkey Wrote: Ok yes its new feature also i edited my post if you could share your opinion The things you see that are private are fields and hold the actual values. The properties are like methods that expose them. RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - cocaine_monkey - Nov 15, 2017 (Nov 14, 2017 06:11 PM)gigajew Wrote: The things you see that are private are fields and hold the actual values. The properties are like methods that expose them. Yes i know that Just so you can learn something new too in c++ Code private int value;same with get and why _ prefix instead of this? this. Is feature? RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - gigajew - Nov 15, 2017 (Nov 15, 2017 04:08 AM)cocaine_monkey Wrote: Yes i know that Oh I didn't know you meant that part, that's just preference RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - cocaine_monkey - Nov 15, 2017 (Nov 15, 2017 06:17 AM)gigajew Wrote: Oh I didn't know you meant that part, that's just preference Yes im trying to learn how to write "clean" code and saw your properties usage so was interested RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - Ninja - Nov 15, 2017 Why not use auto properties? They are one of the things that make C# great. RE: [Release] Installer.cs | Hidden/Normal startup | Supports environment variables+++ - WinA - May 17, 2018 How could we use this with programs that require admin permissions? Like we run the program initially as admin but once its copied to startup would it fail to run properly without running as admin? |