Category Archives: Information Technology

Exploring Xamarin.Forms and Storage

Tools

Resources

 

 

Handling Failed Disk or S.M.A.R.T. failed warning on MAC running on Windows 8.1 Bootcamp

This particular machine is using Windows 8.1 as primary OS on the MAC instead of OSX. While running on Windows, the warning message after login to the machine saying the disk has some issues. Boot into OSX and it confirmed that on the disk there is a warning saying: S.M.A.R.T. failing.

Here are the procedure to handle this:

  1. Contact Apple Support to check whether it’s still under warranty or not. Please note that in Australia, there is a consumer protection law which any device that more than $800 the warranty needs to be 2 years. Apple Global Support doesn’t know this – by default is only 1 year. Apple will advise to go to their repair centre or authorised third party.
  2. Boot on  Windows 8.1, run System Backup first
  3. Apparently, there is a way to safe Bootcamp partition natively without third party software – How To Backup and Restore Boot Camp Partition on Mac HD – https://www.youtube.com/watch?v=RGsvFem5UfU . Boot into OSX, and run Disk Utility
  4. Once the procedure (2) and (3) are ok, then take the device to repair centre.
  5. In regards to getting the harddisk back, Apple has policy that to return any disks back to them for refurbishment and they will delete permanently before reusing it.
  6. Once the Repair Centre has completed the job to replace the disk, you can ask them to do maintenance on the old disk prior sending to Apple to make it more secure.

 

 

Exploring ASP.NET MVC

Code First method build from scratch

  • Make a backup of /Model files and /Migrations and delete xxx_Initial.cs one, delete all files under /Migrations, delete all tables in database
    OR
    Alternatively run: Update-Database -TargetMigration $InitialDatabase to roll back to what it was
  • Run enable-migations -Force in PM>
  • Change the /Migrations/configuration.cs file with file below – notepad
  • Run add-migration Initial in PM>
  • Run update-database in PM>
  • Check the database and all the class table in there as well Identity one (ASPNETxxx) and also the /Migration/xxxxxxxx_Initial.cs appearing with ASPNET as well.

Note

  • The Designer Code for this migration file includes a snapshot of your current Code First model. This snapshot is used to calculate the changes to your model when you scaffold the next migration. If you make additional changes to your model that you want to include in this migration, then you can re-scaffold it by running ‘Add-Migration Initial’ again.

Challenges

 

Resources

PowerShell accessing remote machine

Challenges

The remote machine is running under Workgroup not as a Domain. The software updates such as Adobe Acrobat needs to  be updated manually due to the current standard user credential won’t let the system to install it (UAC) and it required Administrator account to login and run. The administrator has to logon every machine manually and run it the updates. The updates sometimes ran every week.

Solution

 

On the Remote machine

Start Windows PowerShell as an Administrator by right-clicking the Windows PowerShell shortcut and selecting Run as Administrator

At the PowerShell prompt, verify the WinRM is running by using the following command:

get-service winrm

The value of the Status property in the output should be Running.

To configure WIndows PowerShell for remoting, type the following command:

Enable-PSRemoting -force

If the remote computer is not in a trusted domain, the remote computer might not be able to authenticate the credentials. To enable to authentication, it requires to add the remote computer to the list of trusted host for the local machine in WinRM. To do so, type:

winrm set winrm/config/client ‘@{TrustedHosts=”LocalComputer”}’

On the local machine

Start Windows PowerShell as an Administrator by right-clicking the Windows PowerShell shortcut and selecting Run as Administrator

Run the following command:

winrm set winrm/config/client ‘@{TrustedHosts=”RemoteComputer”}’

or

winrm set winrm/config/client ‘@{TrustedHosts=”*”}’

Exit from this application.

Run Windows PowerShell ISE as Administrator

Create Untitled.ps1 document and save it under: C:\Users\Username\Documents

$Credentials = Get-Credential
Enter-PSSession -ComputerName RemoteComputer -Credential $Credentials

Run hostname to verify local machine

Run the Untitled.ps1 command with authentication window

Run hostname to verify that on remote machine

Capture

 

 

Environment

  1. Remote machine: Ms Windows 7 Professional
  2. Local machine: Ms Windows 7 Professional
  3. Network: Workgroup NOT domain

 

Updating Post Service Pack 3 Office 2003

Challenge

Office 2003 is no longer supported, automatic updates is no longer working and there are lots of Office Updates 2003 after post Service Pack 3.

Solution

Download Office 2003 Update List (.ulz) file from this post (last updated November 2015) – http://www.msfn.org/board/topic/163238-post-sp3-updates-for-office-2003-updated-14-nov-2015/

Download and run Windows Updates Downloader – http://www.windowsupdatesdownloader.com/ProgramFiles.aspx

 

Troubleshooting on very large Windows.edb file on Windows 8.1

Challenges

This machine is a Apple MacBook running bootcamp for Windows 8.1 and it’s been running for almost 1+ year and now we are facing the increasing Windows.edb file (50GB+) and we have to do temporarily solution by deleting this file and redo the indexing again. Eventually it came up again after month or so.

Solution

At this stage, there is no real solution yet from Microsoft. The following steps are temporarily solution:

a. Swipe in from the right edge of the screen, and then tap Search. Or, if you are using a mouse, point to the lower-right corner of the screen, and then click Search.
b. Tap or click Settings.
c. In the search box, type indexing options.
d. Tap or click Indexing Options.
e. Tap or click Advanced.
f. Tap or click Rebuild on the Indexing Settings tab.
g. Tap or click OK to confirm.

Alternatively, for temporarily solution:

a. Search for “Indexing Options” (under “Settings”). Open it.
b. Search “services” (or run “services.msc”) and find “Windows Search”. Stop the service.
c. Delete the Windows.edb file
d. Click “Modify” in the already-open “Indexing Options” panel, then click “Delete and Rebuild” for the index. You can also specify a different drive to store the index on.

Please note, there was an update in regards to this from Microsoft (KB 2838018) however it’s only relating on Windows 8 only NOT Windows 8.1.

Someone posted the paid solution from Microsoft based on this thread on the forum. The technician’s report of what he did is pasted below.

  • Edited the windows  search components
  • Followed this online instruction (http://www.eightforums.com/bsod-crashes-debugging/33651-crawl-could-not-completed-content-source-winrt. html)
  • Stopped and start the search services – run sfc /scannow
  • Run dism /online /cleanup-image /restorehealth
  • Run search and indexing troubleshooter
  • Run  hardware and device troubleshooter
  • Run windows update reset components
  • Run powershell with the command below
powershell Get-AppXPackage -AllUsers |Where-Object {$_.InstallLocation -like "*SystemApps*"} | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}
  • Restarted the pc and test the functionality of the resolution

References