Thursday, 25 October 2012

Connect to registry settings remotely

Launching regedit, connecting to the remote system (File | Connect Network Registry), and inspecting that system's [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ Windows\CurrentVersion\Uninstall] may not be as nice as the Control Panel applet, but it may work in a pinch...

Monday, 22 October 2012

Windows 7: Task scheduler - Run a batch file in the background on every 5 minutes

  1. Create a batch file called copy.bat with following command: xcopy C:\inetpub\wwwroot\GYMREG \\its3\users\staff\mah\Website\GYMREG /E /Y  
  2. Create a new task in task scheduler and run it on every 5 minutes.
  3. In order to run batch file on every 5 minutes you have to run the scheduled task with another user not using the user normally will be logged on. For example if you login on your pc using mah account then you should run the scheduled task using its2 or any other account.
  4. The box for "Do not store password" also says "The task will only have access to local resources." As my task didn't need network access, I thought leaving this box checked was OK.  I un-checked it, and now the task runs with no users logged in.  The XML changed from

Error messege: the selected task "{0}" no longer exists. to see the current task, click refresh

I spent a few minutes and tracked down the problem and a solution. The issue is a result of task files which exist in the Tasks folders which have no entry in (presumably) in the registry. Here's how I worked through the issue - will take some time, but it has cleared up the issue completely for me:

  1. Open Task Scheduler and click OK when prompted with the error. It may seem like you are receiving the same error over and over, but this is really due to the number of tasks which are broken. Make a note of the number of times you are prompted with the the selected task "{0}" error. This is the number of task files that are out of sync with the registry.
  2. Start with the first folder under Windows tasks (Task Scheduler(Local)\Task Scheduler Library\Microsoft\Windows) and select each folder in turn until you receive the the selected task"{0}" error. This folder contains files that are not in sync with the task scheduler.
  3. Open Windows Explorer and navigate to the tasks file folder (%SystemFolder%\Tasks\Microsoft\Windows) and find the folder which corresponds to the folder in which you received the error.
  4. For some tasks you will be able to determine which files need to be deleted by comparing the list in the Task Scheduler with the list of files in Explorer. Some tasks will only have a single file in explorer, or, in one case I had 2 and the first was missing. Once Task Scheduler encounters this error it will no longer display tasks so it makes the job of getting the two in sync a little more difficult. Once you have determined which files exist in the File Folder but do not exist in the Task Scheduler folder, delete those files.
  5. IMPORTANT - Close and Re-open Task Scheduler. Once the error is encountered, Task Scheduler no longer displays the tasks so you need to close it and restart in order to continue your synchronization effort.
  6. Continue to select folders in Task Scheduler under Windows tasks until you encounter the error again and repeat the process of determining which file exists on the file system, but not in Task Scheduler.
I had 6 files that were out of sync with what was displayed in Task Scheduler. Once I deleted all of the offending files, Task Scheduler fired up without issue.

Thursday, 11 October 2012

Solution: IE (internet explorer) processes not closing down

Sometimes when you close a tab or IE itself it doesnt always shut down the corresponding process:
1. Open regedit
2. navigate to HKCU\Software\Microsoft\Internet Explorer\Main
3. Either create a dword entry called TabShutdownDelay or if its already there edit it (wasnt there on mine)
4. Enter the value (in seconds) you want for how long it takes to shut down the process (0 will force the process to close immediately)

pls do same to 2 more registry keys as below:

HKLM\Software\Microsoft\Internet Explorer\Main

HKLM\Software\Wow6432Node\Microsoft\Internet Explorer\Main

Monday, 8 October 2012

No access to IIS from another computer

Normally this is firewall problem if you can access iis localy. It means the computer you are trying to access:
--> go to that computer
--> open a browser and type: http://localhost/
-->if you can access the iis locally that means iis is running.

-->open the firewall
-->click the - allow a program or feature..
-->find the allow the program called: World wide web services(http)
-->click ok and exit firewall