Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Wednesday, September 23, 2015

Windows 7 Safe mode - Starting "Run Installer" and "Print Spooler" services

Windows Installer will not work under Safe Mode, this means that programs cannot be installed or uninstalled in safe mode without giving a specific command using msiexec in command prompt.

To make Windows Installer work under safe mode, you need to create a registry entry for every type of safe mode you are logged in to.

Run these commands from command line:
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\MSIServer" /VE /T REG_SZ /F /D "Service"

net start msiserver 


To Start Print Spooler
Method-1:
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\Spooler /VE /T REG_SZ /F /D Service

Net Start Spooler

Method-2:
Run Command prompt in administrator mode (right click and press "Run as Administrator"), and then run these commands.
Net stop spooler
sc config spooler depend= RPCSS
Net start spooler
exit

Reference:
1. http://www.symantec.com/connect/blogs/windows-installer-safe-mode
2. https://forums.techguy.org/threads/solved-enabling-print-spooler-in-safe-mode.1056317/
3. http://www.techsupportall.com/solved-print-spooler-error-1068-the-dependency-service-or-group-failed-to-start/

Saturday, December 27, 2014

Activate/Enable Sound in Windows 7 Safemode

Here are the sequence of steps. For full steps refer the reference [1].

  1. Run (Win key+R key) regedit
  2. Press Ctrl+F
    1. Make sure "Keys", "Values", and "Data" are all selected
    2. Type in Sound, video and game controllers
    3. Click [Find Next]
  3. Take note of the branch address in the status bar at the bottom (it will be something like HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Class\{4D36E96C-E325-11CE-BFC1-09002BE10318})
  4. Copy the device-driver GUID (the long numeric part between braces) and paste it somewhere like Notepad
  5. Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SafeBoot\Network
  6. Create a new key (right-click, select New → Key)
    1. Copy the GUID you saved and paste it into the key name
    2. Edit the (Default) value and type Sound, video and game controllers
  7. Create several new keys (under Network) called AudioEndpointBuilder, MMCSS and Audiosrv
  8. Edit the (Default) values of each of the new keys and type Service
  9. Reboot (you’ll boot into safe-mode)
  10. Open the Services snap-in (Win key+R key → services.msc)
    1. Search for "Multimedia Class Scheduler", "Windows Audio Endpoint Builder", and "Windows Audio Service services", and check if they are automatically turned on (they should be). If not start them. 
References:
1. http://superuser.com/questions/354325/how-to-enable-audio-in-safe-mode

Tuesday, April 8, 2014

Changing Windows Internet time synchronization frequency

You might come across situations when you need multiple Windows machines to have their times synchronized. You could setup time synchronization protocols between the machines, making one as the master and the others as slaves.

An easier alternative is to sync all the machine times to Internet times - the NIST time or Windows server time available by default in the Date & Time settings. Once you sync the machines with the Internet time, the machines might start drifting away over a period. Hence Windows periodically syncs the times with the Internet time; however, the default sync duration ranges from few days to weeks.

You can make the time sync happen much more frequently - like few hours. To do this, you need to make system registry changes. The following instructions are for Windows XP machine; for other versions, the process might be similar.

1. Go to Start-> Run and type "regedit" to open the registry settings.

2. Navigate to the following in the Registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient

3. The parameter you need to change is SpecialPollInterval
Right click on 'SpecialPollInterval' in the right hand column and select Modify>Decimal. The decimal number is in seconds. For example, you can set it to 86400 to mean 24 hours.

NOTE: Please backup the Registry beforehand to avoid any issues later (I do not know how this can be done).

Reference:
1. http://www.tomshardware.com/forum/55562-45-changing-frequency-internet-time-synchronisation 

Tuesday, January 28, 2014

Delete "Not Existing" files in Windows 7

Sometimes even after we delete a file or move it, its ghost copy might still remain in the original folder. The ghost file might have been created due to a race condition. When we try to delete the file, we get an error stating "Cannot Delete the File, The file does not exist".

In that case, use a command prompt in windows and navigate to the folder. Use "dir /x" command to see if the ghost file is being listed. As per the reference [1], if you can identify the 8.3 format filename in the output, you can use it to delete the file using "del <filename>" command from the prompt. An easier way would be to use wildcard filename to delete the ghost file. The wildcard command might look like " del *file.txt".


References:
1. http://superuser.com/questions/388860/cant-delete-files-that-do-not-exist-but-appear-in-my-download-directory

Saturday, April 6, 2013

Installing Python SetupTools on 64-bit Windows


I already installed Python 2.7 on Windows 7 64-bit. When I try to run the installer for setuptools it tells me that Python 2.7 is not installed. The specific error message is:

"Python Version 2.7 required which was not found in the registry"

This seems to be a known error. As indicated in reference [2].
"Apparently (having faced related 64- and 32-bit issues on OS X) there is a bug in the Windows installer. I stumbled across this workaround, which might help - basically, you create your own registry value HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath and copy over the InstallPath value from HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath. See the answer below for more details.


If you do this, beware that setuptools may only install 32-bit libraries."

I followed instructions in reference [1].
"Apparently, the setuptools msi is looking for the Python installation registry value InstallPath in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath. Notice the Wow6432Node, which is a registry compatibility layer used for 32-bit apps in Windows 7 64-bit.

As far as I can tell, InstallPath is the only value that this installer looks for. Therefore, using regedit, you can create your own registry value HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath, and copy over the InstallPath value from HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath. To be paranoid, you can try replicating the entire cluster, not just InstallPath.

After this, installation for setuptools seems to proceed correctly. Note that this may only install 32-bit libraries -- WoW6432 is a compatibility layer. Check the other documented solution to this problem if this is not sufficient."



Following the instructions seems to solve the issue, and setuptools installation succeeded.

References:
1. http://selfsolved.com/problems/setuptools-06c11-fails-to-instal/s/63
2. http://stackoverflow.com/questions/3652625/installing-setuptools-on-64-bit-windows

Tuesday, October 2, 2012

VNC viewer: copy and paste text

If you are unable to copy text from and to a VNC client to your windows operating system, make sure the vncconfig application is running on the remote server.

Run "vncconfig &" from the vncviewer, and check all checkboxes.

From Unix to Windows from a VNC session:
1) Highlight the text you want to copy by holding down the left mouse button and dragging, just like in Windows. This copies it to the Windows clipboard.
2) Go to your Windows window and paste it from the clipboard as usual.

By the way, to paste it into the Unix window, put your cursor where you want it to go, then click the middle mouse button.

Reference:
http://www.unix.com/windows-dos-issues-discussions/40732-vnc-copy-paste-problem.html

Run Java console application by double click

Assume you have written a console java application in Eclipse and want to distribute it to users as an executable. You export the class files as an executable JAR file from eclipse, however to run the JAR file you need to use Windows Command Prompt and type in the command
java -jar Filename.jar arguments

To make it more easily runnable - by a double click - we need to create a .bat file with the following contents  and present in the same folder as the JAR file.

@echo off
 set jarpath="JavaApp.jar"
 java -jar %jarpath% %CD%Config.txt
 PAUSE

Here, %CD% is a pseudo-variable which holds the working directory. It’s useful when you want to load a config file located in the same folder as your .bat file. You can also replace it with any arguments for the JAR file. PAUSE displays a localized version of “Press any key to continue…” message.

References:
http://blog.mwrobel.eu/how-to-properly-run-java-consol-application-with-a-doubleclick-windows/