Solved Run At Startup
-
im pretty sure it just needs some extra dlls.
Did you just take it from its installation folder and
put alone in c:\ ?
and u did use 2 backslashes ?c:\\xx.exe <-- 2 in code
Is it a public free one i could also download?
-
@mrjj said in Run At Startup:
im pretty sure it just needs some extra dlls.
Did you just take it from its installation folder and
put alone in c:\ ?
and u did use 2 backslashes ?c:\\xx.exe <-- 2 in code
Is it a public free one i could also download?
Okay, here is the actual link to the resource monitor
QProcess::startDetached("C:\\Program Files (x86)\IObit\Advanced SystemCare Ultimate\Monitor.exe");
And yes, I put a shortcut in C: and also in system 32, so that I could try using it both ways:
QProcess::startDetached("C:\\Monitor.exe"); QProcess::startDetached("Monitor.exe");
Trying all three above shows no errors, but won't work either :(
-
Hi
I do not think you can just copy monitor alone.
that is the error. i guess it has dlls in its folder, which are NOT found when running it
with QProcess since they are in other folder.for this line
QProcess::startDetached("C:\\Program Files (x86)\IObit\Advanced SystemCare Ultimate\Monitor.exe"); did you escape all slashes ? also it might not like the spaces unless you put "" around
like this
QProcess::startDetached("\"C:\\Program Files (x86)\\Windows Photo Viewer\\ImagingDevices.exe\"");
this starts the app.
-
Yeah, I've tried that way as well... my newest attempts are:
QProcess *process = new QProcess(this); QString monitor="\"C:\\Monitor.exe\""; process->startDetached(monitor);
AND
QProcess::startDetached("\"C:\\Program Files (x86)\\IObit\\Advanced SystemCare Ultimate\\Monitor.exe\"");
Neither one of them work either. Grrrrr Your example works fine. It opens correctly... what am I doing wrong?
-
@Epiales666
I guess that Monitor.exe dont like to be started like that :)
Im not sure what environment QProcess starts with. if copy of default
or a reduced one. In any case, i think Monitor.exe tried to load something in dont find when started like that. -
@mrjj said in Run At Startup:
@Epiales666
I guess that Monitor.exe dont like to be started like that :)
Im not sure what environment QProcess starts with. if copy of default
or a reduced one. In any case, i think Monitor.exe tried to load something in dont find when started like that.Yeah, I can do variants of
QProcess *process = new QProcess(this); QString monitor="\"C:\Monitor.exe\""; process->startDetached(monitor);
And it will work. Like if I put in the address for internet explorer, it works fine. So does the example you gave me... But it doesn't seem to like Monitor.exe for whatever reason. Frustrating. It shouldn't matter what exe it is. It should open regardless.
Anyway, thank you for your help. I'll still mess around with other variants and see if I can't get something to work.
-
@Epiales666 said in Run At Startup:
what exe it is. It should open regardless.
No, that really is not the case.
if it has some path set in ENVIRONMENT it uses for data or loads dlls directly from subfolder next to exe, it
wont work as QProcess might not have
same setup in ENVIRONMENT. ( i dont know if true or false)Also if this one
"Advanced SystemCare Ultimate 10 is a powerful and full-scale software for PC security"
It might detect it as tampering and hence do not start. -
Thank you very much for your help. I'm going to go ahead and classify this topic as solved, since there is no work around to doing what I'd like to do. You were an extremely helpful person. I'll go back and add to your reputation. Thank you much
-
So you know, I solved the problem by doing the below:
QDesktopServices::openUrl(QUrl("file:///C:/Program Files (x86)/IObit/Advanced SystemCare Ultimate/Monitor.exe", QUrl::TolerantMode));
Only issue is I don't know how to place it to a particular spot on my system. I have a blank table set inside my program so that I can move it right into that spot and it looks lke it's part of the program lol... so just have to figure out how to move it to x and y position so that it starts there along with the program at startup.
But wanted to let you know there was a work around to get it to start when system boots. Again, thanks for your help.
-
So you can see what I'm talking about...
https://gyazo.com/b225e65df38e57dafea62e680349089c
See the Ram and CPU at the top? That's the Monitor.exe.... I just either need to move it to x and y position, or somehow place it WITHIN the app so that it shows there...don't know how to do either lol. I used the:
setGeometry(1510, 30, 10,10);
For the app location, but not sure how to do that one. Thanks!
-
@Epiales666
Hi
Cool launcher :)
I think its sadly not possible to embed monitor into your app.
But you should be able to move it but to control it, i think you need native windows api.Update
Why not get the values your self?
https://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process -
@Epiales666
You want to run an external program.
From your (Qt) app you can cause that program to launch, just like however you run it now without any app.
You cannot make that other program's windows or whatever be a part of your program's windows, or control its windows, such that it is embedded in your Qt app. -
Oh nice. I have that bookmarked. Will definitely think about trying to do that. Thank you!
-
@JNBarchan
Yeah, I didn't think it possible to embed it into the program. As you read above, we had a problem getting it to even run at all outside the program. I fixed that today thank goodness. And yeah, wouldn't be anyway to even operate it if it were embeded. I just will figure out how to move it 'INTO' the table I have in my program. Or should I say, move it OVER my app to make it appear to be inside it lol. Thanks for taking the time to reply. I really do appreciate it.
-
@Epiales666 said in Run At Startup:
@JNBarchan
I just will figure out how to move it 'INTO' the table I have in my program. Or should I say, move it OVER my app to make it appear to be inside it lol.
That is likely to prove difficult. Since it will only be "over" your app, if, say, your app's window is moved the resource monitor will not move with it. Further, because of the "over" you may find window up-front problems, or when over it may block interaction with your app, depending on how the monitor behaves. You will not find a robust solution this way, just saying.
-
@JNBarchan
Yeah, I have it always on top for both of them, and it does stay right in the area at the top of my application. It doesn't fall behind it or anything. I set my app to show at the far right top of my screen to be away from anything I"m doing. My internet browser and screen is big enough that I don't have to have it full screen, so I always see my app. It works for me pretty well, as my screen is large enough. I do think, however, I'm going to look into the link that @mrjj posted above, and see about putting them inside the app.
-
@Epiales666
If it works for you personally that's fine :)To avoid separate-process/windows issues, you need either @mrjj 's solution of you write your own (Qt) application to display the data, or you find something like a resource monitor "component" which is for embedding in your code. I would Google for that first.