Showing posts with label Windows 8 tweaks and tips. Show all posts
Showing posts with label Windows 8 tweaks and tips. Show all posts

Tuesday, May 20, 2014

Sync network folders to OneDrive automatically

A few weeks ago I have written a post about synchronizing your OneDrive local folder to a network folder, in this post, however, we will talk about synchronizing server folders to the OneDrive folder automatically using a Robocopy script.

First off let's create sub-folders inside your OneDrive sync folder that will represent your network shares. For example if we have a server named Server and shared folders on it named Folder1 and Folder2 - we shall create them as subfolders inside our OneDrive sync folder, as:
(assuming the system partition is C:)

C:\Users\username\OneDrive\Folder1 (and other shared folders)
or
C:\Users\username\OneDrive for Business\Folder1 (and other shared folders)

Then, after all of our subfolders are created, we create a batch script containing:

@echo off

 robocopy "Source network folder" "Destination OneDrive Sub-folder" /MIR /COPY:DT /MON:1

We will have to create a Robocopy command like this for each one of the network folders that needs to be synced with OneDrive.

If the server requires credentials, you will have to add a line before the Robocopy command:
net use \\servername /USER:username password

After the Robocopy command you might want the script to log out, using the following command:
net use \\servername /d

This is a syncing script, that's why we're using the /MIR switch, this means that if we delete the file in the source folder, the file will soon be deleted in the destination folder. If you wish to copy files and not sync them, you can use /E /COPY (or /COPY:DT) instead of /MIR.

I also should mention that /COPY:DT switch in the above script is optional, it instructs Robocopy to preserve the files' Date and Time stamps but not attributes. I just prefer using it in this situation for better stability.

Now we can save the script as a BAT or a CMD file and run it (preferably in elevated mode) to see how it works. The script will never close unless the command prompt is closed manually, so this may create an annoyance to the user. That's why it may be a good idea to automate it's execution and keep it hidden from the user.

To do that we go into Task Scheduler and create a task to run this script. I recommend the trigger being the user's logon. Because if the trigger is a certain time of day - there may be duplicates of the same process, because the process never stops anyway.

Make sure you set the SYSTEM account as the account running the task, and mark it Hidden. This will allow the script to run invisibly in the background. This starts the cmd.exe and robocopy.exe processes and they only take a few hundred kilobytes in memory.





Saturday, May 10, 2014

Windows 8 Single Language image for download



Here you can find a Windows 8 Single Language installation image. This image is in Portuguese (Português) and Spanish (Espanol).

DOWNLOAD Win8_EM_x64.iso

It is possible to change the language later using my post about changing the language of Windows 8 Single Language.

You can use the product key of another version of Windows 8 Single Language to activate this image (for example if you'd like to re-install Windows on your laptop).

Monday, March 10, 2014

Sync files to OneDrive and a local server together automatically.

I have always thought that keeping valuable data in more than one place is essential to productivity. So it's always best practice to sync your files to an external location, especially in the work environment. A good stable sync is what we will talk about in this post.

Recently, I migrated one of the companies that I work for to Office 365. As some of you may know - Office 365 packages come with the OneDrive service that provides 25GB of online storage.
So up until the migration - the users' data was automatically synchronized to the in-house file server (using Offline Files). There is a great many ways to synchronize data from a user's machine to a network location - from using Offline Files, to scripting, to third party software. In this scenario I will talk about synchronizing to both a local network location and a cloud service (OneDrive for Business in this case) without using any third party software.

First, let me point out that OneDrive currently provides one sync folder on the computer where everything that you want synced has to go. You cannot designate other folders to be synchronized to OneDrive unless you copy them to the sync folder and continue to work from there. So let's say you do that but you'd still want the same data synchronized to your local file server. And you don't want to use third party software that may create system instability, or load it up.
So, we're going to accomplish this task by using a Robocopy monitoring script that will be running invisibly in the background. All the time.

So we create a batch script that will contain the following:

@echo off
robocopy "Source OneDrive Folder" "Destination network folder" /MIR /COPY:DT /MON:1

Now (assuming your system partition is C:), your source OneDrive folder is usually located at

C:\Users\username\OneDrive
or
C:\Users\username\OneDrive for Business

Your destination should be a local folder or a network share. Don't forget the quotation marks.

You might also need your shared folder credentials if the share is password protected, so to log into the share correctly the script would have to present the correct credentials. To do that you will have to add a line that logs into the share (before the Robocopy command):

net use \\servername /USER:username password

After the Robocopy command you might want the script to log out, using the following command:

net use \\servername /d

This is a syncing script, that's why we're using the /MIR switch, this means that if we delete the file in the source folder, the file will soon be deleted in the destination folder. If you wish to copy files and not sync them, you can use /E /COPY (or /COPY:DT) instead of /MIR.

I also should mention that /COPY:DT switch in the above script is optional, it instructs Robocopy to preserve the files' Date and Time stamps but not attributes. I just prefer using it in this situation for better stability.

Now we can save the script as a BAT or a CMD file and run it (preferably in elevated mode) to see how it works. The script will never close unless the command prompt is closed manually, so this may create an annoyance to the user. That's why it may be a good idea to automate it's execution and keep it hidden from the user.

To do that we go into Task Scheduler and create a task to run this script. I recommend the trigger being the user's logon. Because if the trigger is a certain time of day - there may be duplicates of the same process, because the process never stops anyway.

Make sure you set the SYSTEM account as the account running the task, and mark it Hidden. This will allow the script to run invisibly in the background. This starts the cmd.exe and robocopy.exe processes and they only take a few hundred kilobytes in memory.


You can also check out my post on how to sync network shares to OneDrive automatically.

Saturday, November 9, 2013

Make Windows 8 look like Windows 7

I know this topic has been discussed many many times, but I would just like to throw in my two cents.

I tested many different ways to incorporate the Start button many users are used to into Windows 8, including ViStart, StartW8 and others, but Classic Shell provides the best start button. It is multilingual, which means it adopts to almost any Windows 8 UI language, it provides drag-ability to items that are inside it, search bar shows items in real time, basically every feature you'd want in your Start button is present here.

Now, Windows 8.1 already comes with the Start button, which in my opinion is far from what the Start button should be - it simply throws you back into Start Screen (the one with the tiles).
In this case, Classic Shell doesn't create a secondary Start button but simply replaces the current one:

Windows 8.1 start button


It is, of course, programmed to start up right into desktop like Windows 7 would. So now, the Start Screen is simply an optional feature that you can use when you feel like it, and your default interface closely resembles Windows 7. This, in my opinion, is what Windows 8 should be like - you choose your default interface depending on your device. There is no need for touch interface on a desktop computer - same as it's quite hard to use the Desktop with the icons on a 7-10 inch tablet.

Anyway, the desktop is still draggable downwards like it used to be, which will bring you back into Start Screen, and you can also access it via the Classic Shell Start button, its right up there on top of the recently used apps.

For those who'd want their Gadgets back - there's a program called 8GadgetPack which brings back all of the old gadgets plus some new interesting ones, and it even comes with the sidebar for the Vista die-hard fans.

Now, all that's left is modifying the default way your files are opened, because by default most picture files will open with the default photo app which is in full screen. Granted it now looks better than it did in Windows 8, it may still be burdensome for those who want their picture in an actual 'window'.
So to make sure our files aren't opened with Apps but rather with Programs - we should modify our Default Programs inside Control Panel. Click on Set Default Programs, scroll down to Windows Photo Viewer and set it as the default program for opening pictures and photos.


Same can be done regarding PDF files (after you've installed Adobe Reader), music files, videos, etc etc.


Wednesday, November 6, 2013

Windows 8 Single Language edition can have its language changed

When you buy a cheaper laptop you may have Windows 8 Single Language installed on it, which means there is a preinstalled interface language (or sometimes a few languages) and there is no official way to change them as you would in Windows 8 Core (the regular Windows 8).
This is similar to what happens when you buy a laptop with Windows 7 Home Premium preinstalled.

So, there is a way to change the Windows 7 Home premium (or Professional) interface language, and turns out it is the same for Windows 8 Single Language.

You need to have a language pack lp.cab file ready. You may find language packs distributed online for Windows 8, download one for your language and extract the lp.cab file.

The method for Windows 8 is as follows:

  • Put the lp.cab in some folder on your hard drive. Let's put it in C:\lp for example.
  • Open command prompt in elevated mode and type:

DISM /Online /Add-Package /PackagePath:C:\lp\lp.cab


Windows 8 will recommend restarting after successfully adding the package.

After restarting, go back to command prompt in elevated mode and type:


bcdedit /set {current} locale xx-xx (where xx-xx is the language and locale code, for example english US would be en-US)


And the last command:


bcdboot %WinDir% /l xx-xx (again xx-xx will have the language and locale code, for example en-US for english-US)


  • Now without closing command prompt type regedit to launch the registry editor and navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\MUI\UILanguages

and delete the folders that have language-locale codes different from the ones you need. For example ru-RU or es-ES.

Restart the machine and the UI language will be changed to the one you installed. You may still see the remnants of the original language in the tiles or other Windows features, that will go away once you change the region to your locale inside Control Panel.

----
*(Update 15.10.14)
Method for Windows 8.1:


  • Download the appropriate (for your version of Windows 8.1) language pack listed further down in this post.
  • Rename the cab file to lp.cab
  • Put the lp.cab in some folder on your hard drive. Let's put it in C:\lp\
  • Open command prompt in elevated mode and type:

DISM /Online /Add-Package /PackagePath:C:\lp\lp.cab

Windows 8.1 may recommend restarting after successfully adding the package.

If returning from a reboot - go into elevated prompt again.

Now we need to remove the reference to the old language pack. To do that we need to find out the exact identifier of the language pack installed. For this we need to run:

DISM /Online /Get-Packages > C:\pack.txt

Because the list of installed packages is long, the command sends it to a file called pack.txt located in the root of the C: partition. Open the file and look for:

Package Identity : Microsoft-Windows-Client-LanguagePack-Package........
Status: Installed
Release Type : Language Pack

Make sure you find the identifier for your old language pack, so if we're getting rid of the English language - the identifier will have "en-US" in the name.
For example an English language pack that comes with your English based system will be something like:
Package Identity : Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514 
Note the en-US in the name.

Now let's run a command to remove the old language pack (listed in the above example):

DISM /Online /Remove-Package /PackageName:Microsoft-Windows-Client-LanguagePack-Package~31bf3856ad364e35~amd64~en-US~6.1.7601.17514

After the removal procedure is done, you will be prompted to reboot the computer. After the reboot you should be faced with the new language interface.


A big thank you goes to Irina Likhter for pointing out this method!


*Update (25.04.14):
I have uploaded language packs for certain languages for Windows 8 64bit here -

English (US)

Arabic (SA) (العربية)
German (Deutch)
Spanish (Espanol)
Finnish (Suomalainen)
Hebrew (עברית)
Korean (한국어)
Polish (Polski)
Portuguese (Brazil) (Português)
Romanian (Românesc)
Russian (Русский)
Thai (ภาษาไทย)

*Update (05.05.14):
More language packs for the following languages are available for download:

Bulgarian (български)
Czech (čeština)
Danish (Dansk)
Greek (ελληνικά)
Estonian (Eesti)
French (Francais)
Croatian (Hrvatski)
Hungarian (Magyar)
Italian (Italiano)
Japanese (日本語)
Latvian (latviešu)
Lithuianian (lietuvių)
Norwegian (Norsk)
Dutch (Nederlands)
Slovak (slovencina)
Slovenian (slovenšcina)
Swedish (svenska)
Turkish (Türk)
Ukrainian (український)
Chinese Standard (中国语文)
Chinese Hong Kong (中國語文)

*Update (07.05.14):

Working LP for Windows 8.1 will be uploaded in the near future.

*Update (02.08.14):

Here are the Windows 8.1 Language packs direct from Windows Update:

Windows 8.1 32-bit (x86) MUI language packs
Arabic
Bulgarian
Chinese - Simplified
Chinese - Traditional
Croatian
Czech
Danish
Dutch
English - United Kingdom
English - United States
Estonian
Finnish
French
German
Greek
Hebrew
Hungarian
Italian
Japanese
Korean
Latvian
Lithuanian
Norwegian
Polish
Portuguese - Brazil
Portuguese - Portugal
Romanian
Russian
Serbian - Latin
Slovak
Slovenian
Spanish
Swedish
Thai
Turkish
Ukrainian
Windows 8.1 64-bit (x64) MUI language packs
Arabic
Bulgarian
Chinese - Simplified
Chinese - Traditional
Croatian
Czech
Danish
Dutch
English - United Kingdom
English - United States
Estonian
Finnish
French
German
Greek
Hebrew
Hungarian
Italian
Japanese
Korean
Latvian
Lithuanian
Norwegian
Polish
Portuguese - Brazil
Portuguese - Portugal
Romanian
Russian
Serbian - Latin
Slovak
Slovenian
Spanish
Swedish
Thai
Turkish
Ukrainian