resetting the Windows 7 display without logging off - windows-7

When I work from home, I remote desktop into my machine at work. Often when I do this, when I get to work and want to use the machine, the display is screwed up (see picture below) and I have to reboot or at least log off to fix it.
I don't want to log off or reboot as it takes forever. I was trying to fix it some other way. I went to the display, changed the resolution, and then changed it back hoping that would fix it but it did not.
Any suggestions?

Related

Issue with resizing windows using an Application Compatibility shim

I'm trying to run a legacy VB6 application on Windows 10. I'm using creating an .sdb shim file which detects the application's .exe using the Compatibility Administrator tool found in the Windows ADK. Whenever the .exe runs, the screen resolution is resized to a specific resolution. When the .exe stops, the resolution returns to normal.
The Compatibility fixes I'm using are "ForceDisplayMode" with parameters to display at the legacy app's old resolution. And also "ForceTemporaryModeChange" which will revert the screen resolution back to normal.
One problem I'm having is that when the application is open, if I close my laptop lid and reopen it, the .sdb stops working (windows doesn't log out). If I log out, the old resolution is maintained as expected. I'm trying to figure out if there's an option to maintain the .sdb's resolution, or if this is an oversight on Microsoft's end?
Ok, in the off chance that anyone has this incredibly obscure problem in the future, the solution was apparently to disable tablet mode on Windows 10 1809. That solves the .sdb shim being undone by closing the lid on my SP3/SP6s.
Edit: Ok, turns out that was not the solution. It was just coincidence, so I've uncheckmarked this answer. We had an image that didn't have this problem but then later images reverted this behavior. Still don't know why this occurs.
Edit 2: I still don't know why this occurs but I have a few observations that may help someone. I'm on Windows 10 LTSC Version 1809 Build 17763.615. It seems to have to do with specifically putting the SP6 to sleep via flipping up the keyboard. If you sleep by Windows > Power > Sleep or pressing the power button or letting the SP6 go to sleep on its own, the SDB is correctly maintained. Another odd observation is that if you sleep via the 3 ways listed above but then flip up the keyboard, the SDB is cancelled.

Common dialogue control seems to keep my programs running after I close them

I currently run a 64bit Windows 10 development box. I have old VB6 source that I have to unfortunately keep updated for the time being. For some reason all the sudden I noticed that one of the applications I have just built seemed to stay running in the background after the GUI was closed.
I started debugging the issue more and more until I found out that the only time it would seem to persistently stay open in the background after the GUI was closed was if I clicked the button on my form that would call the Common Dialog control to show the file open GUI. I only have to show the file open window and then hit cancel for this to happen.
This ONLY seems to happen on ONE of my dev machines (not the other). Every time I use that CD file open box I have to open task manager up and end the task. I also tried to make sure all forms were closed when my main form starts to Unload. Nothing seems to work or shed any clue on what the issue is. I have also double checked that the following files are now all the same coping them from the known working dev machine to my broken one and re-registering them.
COMDLG32.OCX
comdlg32.oca
comdlg32.dll
COMDLG32.DEP
Both machines are running the same exact OS Win10 Pro 64bit.
That does sound strange, getting different results on the two machines. Pragmatically, you can work around the problem (without actually understanding it) by making sure that you execute an End statement. (You can put it in the QueryUnload event to make sure it's hit if the user clicks the "X".)

Fixing and replacing Google's icons in Windows 10

I remember having fixed this by finding a value in the registry that appeared to be overriding the how the images were shown, but I can't remember where it was, nor the source that showed me. I'm getting annoyed again at having images such as these show up when I pin them to my Windows 10 Pro Start Menu:
I know that there was a fix for this, but for the life of me, I can't seem to remember what it was.
As a note, I had tried tweaking with the shortcuts found in C:\Users[me]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Chrome Apps
to no avail. I swear the fix was related to something simple in the registry, but I can't place my mind on what it was. Any suggestions?

Windows PowerShell.lnk not found

I have a Surfacebook (first generation) running Windows 10 Enterprise and joined to my company's active directory domain. I'm not sure what happened (as best I can tell now updates were installed nor were any GPO applied), but I woke up to a machine that seems to have several core setting reset. All of my apps that were pinned to my Taskbar and Start Menu were gone, and my app auth tokens were reset, and the two powershell related shortcuts off the context menu of the Start button were no longer mapped to .lnk' files. I'm trying to get these powershell menu items working again and I'm having no luck.
Doing this:
Fails with:
This file was indeed gone. I don't know what removed this, but I recreated it:
But still it fails. I've checked the permissions, I own the directory and .lnk. I've rebooted and still it didn't work. Anyone know how to get this back to functional? And I would love to have a clue as to what might have caused all this to go haywire.

Is a mouse click on a remote desktop possible using AutoIt or alternatives?

I want to write a script that involves mouse click and stuff. I am little confused though. Is there a way mouse clicks (in the form of x and y co-ordinates) would work on a VPS which is logged on, but disconnected from the client?
Example:
MouseClick("left",588, 268)
To my knowledge, these VPSes don't have their own native screen resolution. I have already written the script for my local pc and it's working fine on my resolution. But when tried with the VPS, it doesn't work.
PS: I am running the script from the remote desktop itself and not from my local pc. Please correct me if there's anything I am doing wrong :)
Update: For anyone still looking for an answer, consider installing a vnc server, that way the screen resolution you specify is preserved even when not connected to the server.
Ex: https://www.realvnc.com/en/connect/download/vnc/
It's relevant to almost any automation tool, not only AutoIt.
Remote Desktop has its own GUI context only if it's connected to the remote PC. But you can lose focus for a Remote Desktop window (without disconnection & without minimizing) and continue other local work.
The same effect takes place for VNC server software.
One team in our organization uses it for massive test runs automation: a master server creates a remote session for each test machine and keeps them all connected until tests passes.
Use ControlClick to have the mouse click over RDP connections, even when you're not connected. For some reason it can still be iffy for me, but at least it worked more so that Click which was none at all.

Resources