|
-
Jul 5th, 2010, 04:46 PM
#1
Thread Starter
Fanatic Member
Check if its the users first run of app
how can i tell if its the users first run of the application on there machine?
-
Jul 5th, 2010, 05:28 PM
#2
Re: Check if its the users first run of app
There are a ton of different ways of doing it, but I prefer the registry. You can create a SubKey under HKCU\Software\<MyApp> and then make some key like 'FirstRun'. Check if it exists, if it doesn't then create it and set a value.
If it doesn't exist, then you know they haven't used it before. If it does, then you know they have.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Jul 5th, 2010, 05:53 PM
#3
Thread Starter
Fanatic Member
Re: Check if its the users first run of app
I have no idea when it comes to the registry, when you say <MyApp> would i just put my applications name there? Then would i create a subkey like CheckFirstRun?
-
Jul 5th, 2010, 05:58 PM
#4
Thread Starter
Fanatic Member
Re: Check if its the users first run of app
Would you say checking if a boolean named isFirstRun in my.settings = true is a good way off checking first run?
-
Jul 5th, 2010, 06:08 PM
#5
Re: Check if its the users first run of app
You have to know by now that I'm not going to give you the code.
I've given you the idea, now do the research.
This is the exact reason why I keep calling your quote, that is in signature, ironic. Because you're not doing the work and you're definitely not working hard at it. Google it, and then ask questions based on what you've found. This doesn't mean this:
"Okay. I Googled it. Now give me code."
It doesn't work that way either. Try things out and post what doesn't work, any error messages, and relevant information. I want you to do the work while I direct you, but no more.
This process is rather simple though. First, check if the key exists. It doesn't matter what the value of the key is because you only create it if the app has has been ran once or more. If you want to check the values, you can, but it's pointless. So if the key exists, then move on, if it doesn't create it and do whatever you want.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Jul 5th, 2010, 06:14 PM
#6
Re: Check if its the users first run of app
He could even do My.Settings instead of Registry. The MSDN page more or less talks about it, but we're not going to 'hand feed you'.
You should do a bit of research too. If you did a search for "vb.net app first run", you would've found this tutorial on Youtube.
-
Jul 5th, 2010, 06:32 PM
#7
Thread Starter
Fanatic Member
Re: Check if its the users first run of app
no no i know, im just saying what do you think of using that way?
Also formlesstree i watched that and thats where i got the idea from
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|