Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, December 2006
How to get System Dir path?


Message 1 in thread

Hi all,

Is there any way to get some system directory path? I am using
Qt/Window, and what I want to do is to put a shortcut (.lnk file) into
"C:\Documents and Settings\username\Start Menu\Programs\Startup" to
let my application auto-start when Windows boots if the user need this
feature.

I want to find a general way to handle this, since "Documents and
Settings" does not always reside in C: disk. I also want to see my
application would work properly under Linux/BSD, so hard-coding might
not be a nice choice.

Any ideas would be very appreciated. Thanks in advance :-)

-- 
 [ signature omitted ] 

Message 2 in thread

You might want to google this.  Or ask a win32/MFC mailing list, as this
has nothing to do with QT...

However, I can say, you probably want to lookup 
HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run

Scott

> -----Original Message-----
> From: YUAN Jue [mailto:yuanjue02@xxxxxxxxx]
> Sent: Monday, December 25, 2006 7:00 PM
> To: qt-interest@xxxxxxxxxxxxx
> Subject: How to get System Dir path?
> 
> Hi all,
> 
> Is there any way to get some system directory path? I am using
> Qt/Window, and what I want to do is to put a shortcut (.lnk file) into
> "C:\Documents and Settings\username\Start Menu\Programs\Startup" to
> let my application auto-start when Windows boots if the user need this
> feature.
> 
> I want to find a general way to handle this, since "Documents and
> Settings" does not always reside in C: disk. I also want to see my
> application would work properly under Linux/BSD, so hard-coding might
> not be a nice choice.
> 
> Any ideas would be very appreciated. Thanks in advance :-)
> 
> --
> Best Regards
> YUAN Jue @ http://www.yuanjue.net
> 
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/

--
 [ signature omitted ] 

Message 3 in thread

Hi Scott,

On 12/26/06, Scott Aron Bloom <scott@xxxxxxxxxxxx> wrote:
> You might want to google this.  Or ask a win32/MFC mailing list, as this
> has nothing to do with QT...
>

Thanks for your kind suggestion. Since you convince me that it has
nothing to do with QT, I will look for other workaround now :-)

> However, I can say, you probably want to lookup
> HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run
>

My application need to load a plugin when start, but put a RegKey in
such place cannot let the application load it... So it seems not be a
workable way :-(


-- 
 [ signature omitted ] 

Message 4 in thread

Off list..

The registry location is the same as the startup folder, except it
doesn't allow for "start in" directories. It's the new way to do it, the
startup folder is actually discouraged by Microsoft.

If your plugin cant be found, when the tool is started from a random
location, you need to fix your library path, as you should allow the
user to place shortcuts wherever they want.

Scott

> -----Original Message-----
> From: YUAN Jue [mailto:yuanjue02@xxxxxxxxx]
> Sent: Monday, December 25, 2006 7:57 PM
> To: Scott Aron Bloom
> Cc: qt-interest@xxxxxxxxxxxxx
> Subject: Re: How to get System Dir path?
> 
> Hi Scott,
> 
> On 12/26/06, Scott Aron Bloom <scott@xxxxxxxxxxxx> wrote:
> > You might want to google this.  Or ask a win32/MFC mailing list, as
this
> > has nothing to do with QT...
> >
> 
> Thanks for your kind suggestion. Since you convince me that it has
> nothing to do with QT, I will look for other workaround now :-)
> 
> > However, I can say, you probably want to lookup
> > HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/CurrentVersion/Run
> >
> 
> My application need to load a plugin when start, but put a RegKey in
> such place cannot let the application load it... So it seems not be a
> workable way :-(
> 
> 
> --
> Best Regards
> YUAN Jue @ http://www.yuanjue.net

--
 [ signature omitted ]