PDA

View Full Version : Qt application loads tons of dll's ONLY on OS startup



tomrider
11th May 2011, 15:43
Hi Guys,
I have a Qt app that i run on OS startup (by registery)
I have a certain problem... when i pull out a list of the files that exist in my app directory during startup i am getting a list of ~1000 dll's and stuff, but when i run the application directly and not from startup - it only has 7 files...

here is a sample of the files...

certcli.dll
certCredProvider.dll
certenc.dll
CertEnroll.dll
CertEnrollCtrl.exe
CertEnrollUI.dll
certmgr.dll
certmgr.msc
CertPolEng.dll
certprop.dll
certreq.exe
certutil.exe
cewmdm.dll
cfgbkend.dll
cfgmgr32.dll
chajei.ime
change.exe
charmap.exe
chcp.com
chglogon.exe
chgport.exe
chgusr.exe
chkdsk.exe
chkntfs.exe
chkwudrv.dll
choice.exe
chsbrkr.dll
chtbrkr.dll
CHxReadingStringIME.dll
ci.dll
cic.dll
cintlgnt.ime
cipher.exe
CIRCoInst.dll
clb.dll
clbcatq.dll
cleanmgr.exe
clfs.sys
clfsw32.dll
cliconfg.dll
cliconfg.exe
cliconfg.rll
clip.exe
clusapi.dll
cmcfg32.dll
cmd.exe
cmdial32.dll
cmdkey.exe
cmdl32.exe

any idea why it happens? why it happens only when i load the app during startup?
And does it have any security aspects that i need to be aware of?
Thanks

mcosta
11th May 2011, 18:27
it may depend from different app "working directory" (directory where app is launched)

How do you get the file list??

ChrisW67
11th May 2011, 23:36
That looks much more like the activity of a virus scanner. Unless you have coded your Qt app to access these files, e.g. charmap.exe or cmd.exe, it won't do it on its own.

tomrider
12th May 2011, 05:15
The file list is being printed on app startup - that the first thing that happens.
The wiered thing about it, that only when i add this app to startup in registry it show those files as present in the application directory... when i execute it after os startup from file browser - the list is only the application files...
Anyone encountered such a behavior?

rsilva
12th May 2011, 05:23
You're trying to list the files in the application directory right ?
But, try to write to your log file (or output) the current directory before listing.
Maybe the explorer.exe in the initialization sets the working directory of "C:\WINDOWS\system32\"
So, if listing the files of the current working directory, this will make you list the content of system32 directory.

If you're already using the function of qApp. You can try to use the windows api function GetModuleHandle, GetModuleFileName, use the path in a QFileInfo and get absoluteDirectory();

tomrider
12th May 2011, 09:52
looks like the current directory is system32 , any idea why its set to it? or how can i change that to the app directory?