If you company is successful and generates revenue/raises money in the first ~12 months you can file for your own H1B. I am not a lawyer but talk to the immigration officer at your university and also to a lawyer and you will get more information.
As long as it is legitimate and all the legal paper work is done properly, i think it should be fine. Of course, there might be some who register a company just for getting a work authorization and i assume the USCIS will have verifications to make sure you are running a real business and not just a one on paper.
zengr, since you have already moved to H1, i don't think it will be applicable for you. I am also on OPT working for a startup and i am moving to H1 shortly.
The restriction you'll run up against is being employed by the company you form, and having it support your visa.
To do it the right way as a solo founder, you need to go the E2 Investor route. It's painful, but doable.
American immigration laws are specifically designed to keep people out, and that is the biggest barrier you will face. The only way around it is to find a local co-founder and sponsor an H1B visa through the company showing yourself as an employee. There have been recently proposed changes to the H1B rules allowing a sole founder to sponsor their own H1B provided they have investors investing in the company and the company has a board of directors. You will also need to wait a little for enough such cases to go through the USCIS to determine what's the winning formula for such H1B visa approvals. In parallel with all of your other efforts at finding people, you will hence have to find a good immigration lawyer who will also work on a project basis at low rates. Of late, USCIS has be onerous in demanding documented evidence for H1B cases, so you can very well rule out applying entirely by yourself.
The gist is that although it's possible, it's very hard to be an entrepreneur straight out of college if you are not from the country. The shortest route is to fall in love with an american (citizen) girl and marry her. And I don't say that in jest.
It would be nice if US voters at large were a little more aware of how immigration laws work in practice.
[EDIT] I am in no way suggesting the marriage route, just pointing out that there are many countries with enormous backlogs and for people coming from those countries converting H1B to GC for the purposes of starting a company may, unfortunately, not be a viable option.
It took less than 18 months from starting work as a H1B to receiving my green card. I started the green card process a month into my job.
How come? The system is ridiculous; I am lucky enough to have been born in the UK, and not in one of the countries with long years of backlog. I also did a Master's which qualified me for EB2. Between these, my priority date was current so the processing time was simply paper shuffling. Given the suspicion of USCIS around marriages and the process I am going through with my husband's green card, I certainly wouldn't take such a blasé attitude to marriage if you are also, fortunately and entirely randomly, in a current priority class.
Take some money from your country, create a startup in the US with a local guy. When you are able to make money, then if you make enough money, you can even sponsor yourself or go get some investors => you'll be able to sponsor yourself.
I am in currently in the US in Boston, MA.
And yes I am more interested in the advantages and start up culture of Silicon Valley and SF