Strange behavior by the BDE Administrator - bde

Logged into my Windows XP SP2 computer using my normal user account (which has Local Admin privileges), when I start the BDE Administrator -- either from the Control Panel or from the BDEADMIN.EXE directly -- I never get the GUI. It shows up on my task bar, and shows up in the Task Manager, but the GUI never appears. I can close the program by right-clicking on the task bar and choosing close. (note that "never" means not within 5 minutes of launching the program)
If I log into the same exact computer using a different user account (which also has Local Admin privileges), when I start the BDE Administrator, it loads the GUI within a couple seconds.
I used to be able to use the BDE Administrator while logged in under my normal user account, so it's not like this has always been a problem.
While this issue may not be directly programming related, it does make developing and testing a pain when I have to log off and back on a couple of times just to make changes to my BDE configuration.
I am totally stumped. Any idea what might be causing this odd behavior?

One idea is that you may have had two screens running on this box and dragged the window off screen.
Just search for the registry keys that control where the window opens up and delete them. Alternatively, you should be able to right click on the program in the task bar and select Move. Then use your arrow keys to bring it back.
Regardless, I'm voting to close.

Related

Allow Safely Remove Media in GPO

I have a system that I want to lock down, only running certain programs.
All is working so far when I use "Run only specified Windows applications" (under Local Computer\User Configuration\Administrative Templates\System) except when I try to add an option to remove media.
I have the policy enabled with a list of all applications I want to be able to load. And this: "rundll32.exe shell32.dll, Control_RunDLL HotPlug.dll"
but when I run my shortcut for this I just get the error "This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator"
I saw someone online with a similar problem with rundll32.exe but that was with a printer and they got it working by adding a printui.dll. Am I missing something or doing something wrong or is this not possible? I need this option because I have to disable right click in our locked down system.

Refresh/Restart Explorer via Remoting

I have some code that unpins and pins items from the task bar and start menu, which I run using Remoting, as a means of cleaning up lab machines between sessions. It works great, other than I need to log off and back on to see the changes. This is somewhat similar to another bit of code I have, which changes the icon of a shortcut in order to "badge" it as an updated file. That code also requires a refresh, but there I am able to use a technique I found here...This does a refresh of Explorer and the desktop shortcut shows up correctly. However, the same code does not do a refresh of the task bar it seems. I also found this, which also seems to not impact the Taskbar.
Also, this is related to the Remoting, because when I run the same code "locally" no refresh is needed. So, curious if anyone knows a way to directly refresh the task bar (and Start Menu) via Remoting? Or am I going to need to brute force it and just log the user off?
Well, this is interesting, and proof that sometimes we look for complex solutions to simple problems. All the examples I found are pretty complex, but what works fine is simply this...
Stop-Process -processName: Explorer
No need even to restart, as Explorer restarts automatically and near instantly.

Suggestions for a bad PowerShell Script

We have a legacy server service running on a Windows 7 desktop that keeps crashing with a popup window reporting a memory error. The popup stops all processing on the machine. Once the "OK" button is clicked on the popup the system recovers and moves on. The root problem appears to be inside a compiled DLL that the application uses.
This popup usually happens between 9pm and 11pm every couple days.
It happens when no one is signed into the PC, so the popup displays in front of the CTRL+ALT+Delete message for signing in.
I can click OK and it continues processing, signing into the computer.
CHALLENGE:
This is a legacy application that will be replaced when budget allows (maybe next Summer) so there is no budget for upgrade or paying a consultant to fix the root problem.
All we need to do is click the OK button when the "Application Popup" event is thrown (logged in the Event Manager)
I know that it would be WRONG to write a script to satisfy the popup. Fixing the root cause is the CORRECT action.. but we have no support to spend money at this time. And since it's a compiled DLL, we can't fix the code.
Is there a PowerShell script that could:
Watch for a specific event "Application Popup" and if it occurs simulate pressing the ENTER key?
Run in the background, signed out of a user account.
If PowerShell isn't the answer, is there a better macro or script tool to get us by?
I know it's "bad practice" but we just need to get along until we get some budget dollars.
Powershell probably isn't the best answer in this case. I'd suggest using something like AutoIt (the WinWaitActive function would be useful in your case).
I have used AutoIt in the past and have found it very useful for Windows GUI automation.

Is there a way to automatically log onto a Windows XP machine at specific time?

How to set a specific logon time for a specific user on Windows XP?
For example, the computer is an "always on machine" and most of the time no one is logged on. I want to set a time for my user to log on, without someone actually having to be in front of the machine. I've tried a workaround with the built-in auto logon function (control userpassword2), but I still need a secure system as I'm not the only user, and would still want a password even if I was the only user.
I have searched for third party software, but to no avail. I've a good knowledge of batch and Python scripting and a little of Java, so any pointers with any of those would help.
How can it be "secure" if it logs you on without you being there? Surely it would be better for it to wait for you to type in a password (i.e. the login prompt)?
If you want a fast "startup" time, then you can lock the workstation (ctrl+alt+del to open the Task Manager and then click 'Lock'. This shows a dialog just like the login prompt, but when you enter your password you instantly continue your existing session). Or if you want to be more eco friendly, put your PC into Sleep mode, which most PCs will return from (again with an optional password prompt) in less than 5 seconds.
One way I just thought of: Run a Vnc Server, and hack into an open source viewer program. Then you can rig it with some code to pass keyboard commands back into the computer, maybe implement some screen scraping to make sure it only does it when appropriate.
But seriously, there has to be a better way. Why are you trying to do this?

User Initiated Kernel dump in Windows XP

I remember watching a webcast from Mark Russinovich showing the sequence of keyboard keys for a user initiated kernel dump. Can somebody refresh my memory on the exact order of the keys.
Please note this is for XP.
http://psacake.com/web/jr.asp contains full instructions, and here's an excerpt:
While it may seem odd to think about purposefully causing a Blue Screen Of Death (BSOD), Microsoft includes such a provision in Windows XP. This might come in handy for testing and troubleshooting your Startup And Recovery settings, Event logging, and for demonstration purposes.
Here's how to create a BSOD:
Launch the Registry Editor (Regedit.exe).
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters.
Go to Edit, select New | DWORD Value and name the new value CrashOnCtrlScroll.
Double-click the CrashOnCtrlScroll DWORD Value, type 1 in the Value Data textbox, and click OK.
Close the Registry Editor and restart Windows XP.
When you want to cause a BSOD, press and hold down the [Ctrl] key on the right side of your keyboard, and then tap the [ScrollLock] key twice. Now you should see the BSOD.
If your system reboots instead of displaying the BSOD, you'll have to disable the Automatically
Restart setting in the System Properties dialog box. To do so, follow these steps:
Press [Windows]-Break.
Select the Advanced tab.
Click the Settings button in the Startup And Recovery panel.
Clear the Automatically Restart check box in the System Failure panel.
Click OK twice.
Here's how you remove the BSOD configuration:
Launch the Registry Editor (Regedit.exe).
Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\i8042prt\Parameters.
Select the CrashOnCtrlScroll value, pull down the Edit menu, and select the Delete command.
Close the Registry Editor and restart Windows XP.
Note: Editing the registry is risky, so make sure you have a verified backup before making any changes.
And I may be wrong in assuming you want BSOD, so this is a Microsoft Page showing how to capture kernel dumps:
https://web.archive.org/web/20151014034039/https://support.microsoft.com/fr-ma/kb/316450
As far as I know, the "Create Dump" command was only added to Task Manager in Vista. The only process I know of to do this is using the adplus VBScript that comes with Debugging Tools. Short of hooking into dbghelp and programmatically doing it yourself.
You can setup the user dump tool from Microsoft with hot keys to dump a process. However, this is a user process dump, not a kernel dump...
I don't know of any keyboard short cuts, but are you looking for like in task manager, when you right click on a process and select "Create Dump"?