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

Sunday, October 17, 2021

Manual Routing Metric Setting on Windows

https://serverfault.com/questions/238695/how-can-i-set-the-metric-of-a-manually-added-route-on-windows

I know this is late but I just ran into this today - I wanted to connect to gmail but it was blocked from the Domain LAN Web Filter. I brought in a wifi usb to get to the non-domain network and was able to get to gmail by changing the priority of the traffic. This still allowed me to access the domain network as well. To find out the interface #'s
Route Print
Use Netsh to set the lower value on the usb wifi device interface. The lower value means higher priority. This will remove the automatic setting as well.
netsh interface ipv4 set interface 25 metric=2
Use Route Print to verify If you make a mistake you can turn the interface back to automatic
netsh interface ipv4 set interface 25 metric=automatic
For more about netsh see http://www.colorconsole.de/cmd/en/Windows_Vista/netsh/interface/ipv4/set/interface.htm

Tuesday, May 11, 2021

Mapped Network Drive Failed

 Map Network drive with below error notification :

You can't access this shared folder because your organization's security policies block unauthenticated guest access.

as shown below :


Here is a simple remedy for it.
  • Open Registry Editor (Regedit)
  • Go to :  Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters
    • Modify "AllowInsecureGuestAuth" value to "1"

    Close Registry Editor, and try again mapping your drive. 

    It should be working properly now.




    Friday, March 26, 2021

    How to delete the Recovery Partition in Windows 10

     Source : https://superuser.com/questions/1023765/how-to-delete-the-recovery-partition-in-windows-10

    https://www.diskinternals.com/partition-recovery/recovery-partition-and-how-to-delete-it/

    A recovery partition is a partition on the disk that helps to restore the factory settings of the OS (operating system) if there is some kind of system failure. This partition has no drive letter, and you can use only Help in Disk Management.

    As mentioned above, when a system is updated, a new recovery partition is created. This means the old recovery partition will be outdated. That means, that you better keep the current one and delete the old recovery partition.

    But which one is old and which one is current, you may ask?

    recovery partition in cmd

    For that, you will need to use the command line: right-click Start and select "Command Prompt (administrator)". In the window titled "cmd.exe", type the following command: "reagentc / info" and press Enter. In the Windows RE location line, you will get something like: "...\device\harddisk1\partition2\..." Now you need to recheck it with Diskpart; and with that tool, you can also delete it.

    To erase the disk recovery partition, you can use the built-in utility Diskpart.

    So, in the same Command Prompt window enter "diskpart". Then type "list disk":


    DISKPART> list disk DISKPART> select disk 4 Disk 4 is now the selected disk. DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 223 GB 1024 KB Partition 3 Recovery 450 MB 223 GB DISKPART> select partition 3 Partition 3 is now the selected partition. DISKPART> delete partition override DiskPart successfully deleted the selected partition. DISKPART> list partition Partition ### Type Size Offset ------------- ---------------- ------- ------- Partition 1 Primary 223 GB 1024 KB


     

    Tuesday, January 08, 2019

    Turn off time grouping in PivotTables in Excel for Windows

    https://support.office.com/en-us/article/turn-off-time-grouping-in-pivottables-in-excel-for-windows-6be5afed-348c-4db2-9f87-5ac262d67b3f?ui=en-US&rs=en-US&ad=US

    To turn off time grouping on PivotTables (including data model PivotTables) and Pivot Charts, follow these instructions for adding a new DWORD (32-bit) Value registry key. The new key is: HKEY_CURRENT_USER > Software > Microsoft > Office > 16.0 > Excel > Options > DateAutoGroupingDisabled.

    Wednesday, October 31, 2018

    Windows 10 shared folder not accessible

    https://support.microsoft.com/en-us/help/4046019/guest-access-in-smb2-disabled-by-default-in-windows-10-and-windows-ser

    Symptoms


    In Windows 10, version 1709, Windows Server version 1709, and Windows Server 2019, the SMB2 client no longer allows the following actions:
     
    • Guest account access to a remote server
    • Fallback to the Guest account after invalid credentials are provided
    SMBv2 has the following behavior in Windows 10, version 1709, Windows Server version 1709, and Windows Server 2019:
    • Windows 10 Enterprise and Windows 10 Education no longer allow a user to connect to a remote share by using guest credentials by default, even if the remote server requests guest credentials.
    • Windows Server 2016 Datacenter and Standard edition no longer allow a user to connect to a remote share by using guest credentials by default, even if the remote server requests guest credentials.
    • Windows 10 Home and Professional editions are unchanged from their previous default behavior.
    If you try to connect to devices that request credentials of a guest instead of appropriate authenticated principals, you may receive the following error message: 
     

    Cause


    This change in default behavior is by design and is recommended by Microsoft for security.
     
    A malicious computer that impersonates a legitimate file server could allow users to connect as guests without their knowledge. Microsoft recommends that you do not change this default setting. If a remote device is configured to use guest credentials, an administrator should disable guest access to that remote device and configure correct authentication and authorization.
     
    Windows and Windows Server have not enabled guest access or allowed remote users to connect as guest or anonymous users since Windows 2000. Only third-party remote devices might require guest access by default. Microsoft-provided operating systems do not.
     

    Resolution


    If you want to enable insecure guest access, you can configure the following Group Policy settings:
     
    Computer configuration\administrative templates\network\Lanman Workstation
    "Enable insecure guest logons"
     
    Note By enabling insecure guest logons, this setting reduces the security of Windows clients. 
     
    Example :
    
    Default Registry Value: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "AllowInsecureGuestAuth"=dword:0 Configured Registry Value: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanWorkstation\Parameters] "AllowInsecureGuestAuth"=dword:1

    More Information


    This setting has no effect on SMB1 behavior. SMB1 continues to use guest access and guest fallback.
     
    SMB1 is uninstalled by default in latest Windows 10 and Windows Server configurations. For more information see SMBv1 is not installed by default in Windows 10 Fall Creators Update and Windows Server, version 1709.

    Tuesday, November 14, 2017

    Net Use Command for Windows

    The net use command is a Command Prompt command that's used to connect to, remove, and configure connections to shared resources, like mapped drives and network printers.
     The net use command is one of many net commands like net send, net time, net user, net view, etc. 

    Net Use Command Availability
    The net use command is available from within the Command Prompt in Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP, as well as in older versions of Windows and in Windows Server operating systems. Recovery Console, the offline repair utility in Windows XP, also includes the net use command but it's not possible to use it within the tool.
     Note: The availability of certain net use command switches and other net use command syntax may differ from operating system to operating system.

     Net Use Command Syntax
    net use [{devicename | *}] [\\computername\sharename[\volume] [{password | *}]] [/user:[domainname\]username] [/user:[dotteddomainname\]username] [/user:[username@dotteddomainname] [/home {devicename | *} [{password | *}]] [/persistent:{yes | no}] [/smartcard] [/savecred] [/delete] [/help] [/?]

    List all active connection

    net use

    Remove temp credential login
    net use "\\10.158.252.100\xxx" /d

    https://www.lifewire.com/net-use-command-2618096

    Friday, September 29, 2017

    IIS ftp server can't access from other machine

    https://serverfault.com/questions/438314/iis-ftp-server-works-locally-but-cannot-connect-from-remote

    Basically, you have to run:
    sc sidtype ftpsvc unrestricted
    
    And then restart the FTP service:
    net stop ftpsvc & net start ftpsvc
    
    From what I can tell, it's a bug in R2. Go figure.

    Monday, February 27, 2017

    Excel 2013 error; [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Based on your description, your Windows system is 64-bit and your Office is 32-bit.

    I suggest you refer to this support article first:
    https://msdn.microsoft.com/en-us/library/ms712362(v=vs.85).aspx

    As the article said: To manage a data source that connects to a 32-bit driver under 64-bit platform, use :\windows\sysWOW64\odbcad32.exe.
    To manage a data source that connects to a 64-bit driver, use :\windows\system32\odbcad32.exe.

    Make sure that you create your ODBC link using the 32 bits ODBC Manager: C:\Windows\SysWOW64\odbcad32.exe
    Source...

    Saturday, February 04, 2017

    VBA Excel - Using CreateObject

    There are some very useful libaries that are not part of Excel VBA.
    These include the Dictionary, Database objects, Outlook VBA objects, Word VBA objects and so on.

    These are written using COM interfaces.
    The beauty of COM is that was can easily use these libraries in our projects.

    If we add a reference to the library we create the object in the normal way.

    ' Select Tools->References and place a check
    ' beside "Microsoft Scripting Runtime"
    Dim dict As New Scripting.Dictionary

    If we don’t use a reference we can create the object at run time using CreateObject.

    Dim dict As Object
    Set dict = CreateObject("Scripting.Dictionary")

    The first method is referred to as Early Binding and the second is referred to as Late Binding(see Early versus Late Binding) for more details.

    http://excelmacromastery.com/vba-objects/#Subtle_Differences_of_Dim_Versus_Set

    Monday, January 30, 2017

    windows cannot be installed on this disk. The selected disk is of the GPT partition style.

    fresh computer build, on the screen choosing which partition to use i see "windows cannot be installed to disk 0 partition 2. (show details)", when i click show details i get the message, "windows cannot be installed on this disk. The selected disk is of the GPT partition style." What can i do to install window?

    Method #1:
    1. Boot up to installation DVD/CD.
    2. Click install but don't follow through.
    3. Press SHIFT-F10 to bring up console.
    4. Type "diskpart"
    5. Once inside diskpart type:
    -> list disk (find the one you want to convert)
    -> select disk 0 (select the one you want from the list)
    -> convert mbr (should take a second or two)
    -> quit
    6. Continue with install

    Method #2:
    1. Boot up to installation DVD/CD.
    2. Click install but don't follow through.
    3. Press SHIFT-F10 to bring up console.
    4. Type "diskpart"
    5. Once inside diskpart type:
    -> list disk (find the one you want to convert)
    -> select disk 0 (select the one you want from the list)
    -> clean (wait an hour or so until its done)
    -> quit
    6. Continue with install

    https://answers.microsoft.com/en-us/windows/forum/windows_7-windows_install/windows-cannot-be-installed-on-this-disk-the/8fa72a3e-10c5-47da-a040-1e0db62af309

    Friday, December 02, 2016

    Windows 10 Blurry Fonts Solution


    https://forums.mydigitallife.info/threads/62528-SOLVED-Windows-10-higher-DPI-Win8DpiScaling-problem
    REG ADD "HKCU\Control Panel\Desktop" /v DpiScalingVer /t REG_DWORD /d 0x00001018 /f
    REG ADD "HKCU\Control Panel\Desktop" /v Win8DpiScaling /t REG_DWORD /d 0x00000001 /f
    REG ADD "HKCU\Control Panel\Desktop" /v LogPixels /t REG_DWORD /d 0x00000078 /f

    Tuesday, November 29, 2016

    How to Create Bootable Windows USB Disk

    https://anandthearchitect.com/2014/03/07/how-to-create-a-bootable-windows-2012-r2-usb-disk-applies-to-windows-8-1-also/

    Pre-requisites: 7-Zip software (Download it from here: http://7-zip.org/), Windows 2012 (R2) ISO (or Windows 8.1 ISO), 8GB or more USB disk

    Open Command Prompt in elevated mode (Run as Administrator)
    Type diskpart and press Enter
    Type list disk and press Enter. Note the list of existing disks.
    Insert the USB Disk
    Type list disk and press enter again. Note the new disk showed up which is our USB disk. I assume the new disk is 2 for example purpose.
    Type select disk X where X is your USB disk. E.g., select disk 2. Press Enter.
    Type clean and press enter.
    Type create partition primary and press enter to create primary partition 1.
    Type select partition 1 and press enter.
    Type active and press enter to make the partition 1 active
    Type format fs=ntfs and press enter. This will format the partition 1 as NTFS volume.
    Type assign and press enter to assign the USB disk to a drive letter.

    Now right click on Windows Server 2012 R2 or Windows 8.1 ISO file, select 7-Zip –> Extract Files…
    Select your USB disk to extract the ISO contents to the USB disk

    Friday, July 08, 2016

    Clean Install Windows 7 from Hard Drive

    source : http://www.instructables.com/id/Install-Windows-7-without-USB-or-DVD-without-upgra/

    How to CLEAN Install Windows 7 directly from Hard drive – NO DVD or USB needed!!

    For example, you have a netbook or desktop that you want to install Windows 7 onto, but can’t use DVD or USB for whatever reason (or don't want to, like me). This method will allow you to boot and install Windows directly from the hard drive. This guide involves plugging the hard drive into another working computer,preparing the hard drive, placing it back in the system, and installing Windows as usual.

    This guide will work for Windows 7 and Windows 8.  I have a Windows 8 instructable, but it's essentially the same guide with some Windows 8 pictures.  This guide will not work for Windows Vista - I have an instructable for that.

    Part 1: Preparing the HD with Windows 7 setup files.

    - Connect the hard drive to another working computer.
    - Format the hard drive to NTFS (Quick format works fine; multiple partitions also work).
    - Copy the following from your Windows 7 disc:

        Boot
        Sources
        Bootmgr

    Part 2: Making the HD bootable

    Using Windows XP, Vista, or 7, open CMD as Admin (Windows key + R, type CMD, hit Enter)

    Enter the following commands, (replace X with what applies to your hard drive):

    diskpart
    list disk
    select disk X
    list partition
    select partition X
    active
    exit
    X:\boot\bootsect.exe /nt60 X:

    (See picture for example)

    Exit and shutdown.


    Note: If you’re working on a 32-bit system, and you want to install 64-bit Windows, you may get problems trying to run the last command (X:\boot\bootsect.exe /nt60 X:).
    Solutions:

        Use a computer with a 64-bit version of Windows

    OR

        A little trick that worked for me: If you have a 32-bit Windows 7 disc, you can copy bootsect.exe from that and replace the 64-bit one (boot\bootsect.exe).

    Part 3: Booting and installing Windows

    Place the hard drive back into the target machine. Make sure that the BIOS is configured to boot from the hard drive. If you did everything correctly, you should see “Windows is loading files” and setup will load (really fast, too, because it's loading from the hard drive). Install Windows as usual (but don’t format your drive this time in the installer – otherwise it will erase the Windows 7 setup files too!).

    Part 4: Final steps/housecleaning

    We’ll have to quickly edit the boot menu once Windows is installed.

    In Windows 7, hit the Windows key + R. Type msconfig, and hit Enter.
    Click to the Boot tab at the top.
    Click 'Windows Setup (\windows)', and hit Delete.
    Click OK.
    Click 'Exit without restart'.


    And lastly, delete the ‘Sources’ folder from your hard drive root (this will free up 2-3gb).

    Tuesday, July 15, 2014

    Word 2007-2010 password removal

    Go to Developer tab and protect document
    follow task bar to add password for "Read Only"
    save and close
    rename file to filename & .zip
    extract files
    open extracted folder and find "word\settings.xml"
    right-click and edit
    find string starting with "w:documentProtection"
    it will be after "w:proofState" group
    cut to notepad and save
    save
    drag settings.xml to the same location in the zip folder and replace
    rename file to name & .docx
    open document and edit
    repeat steps but paste "w:documentProtection"

    Saturday, January 04, 2014

    VB function : Clean Up / Remove HTML XML code from String

    This function is removing all HTML/XML code from some string.
    Private Function CodeClean(ByVal DStr As String) As String
    Dim i As Long, j As Long
    Dim Chr1 As String, Chr2 As String
    Dim FlBol As Boolean
      Chr1 = "<"
      Chr2 = ">"

      If InStr(DStr, Chr1) > 0 Then FlBol = True Else FlBol = False
     
      Do Until FlBol = False
        i = 0
        j = 0
        i = InStr(DStr, Chr1)
        j = InStr(DStr, Chr2)
        If i > 0 And j = 0 Then
          j = Len(DStr)
        End If
        DStr = Left(DStr, i - 1) & Right(DStr, Len(DStr) - j)
        If InStr(DStr, Chr1) > 0 Then FlBol = True Else FlBol = False
      Loop
      Code Clean = DStr
    End Function

    You may change variables Chr1 & Chr2 to fit your need.

    Saturday, December 28, 2013

    Crack Hacking Password Microsoft Excel Macro VBA Project

    There is another (somewhat easier) solution, without the size problems. I used this approach today (on a 2003 XLS file, using Excel 2007) and was successful.

    1.     Backup the xls file
    2.     Using a HEX editor, locate the DPB=... part
    3.     Change the DPB=... string to DPx=...
    4.     Open the xls file in Excel
    5.     Open the VBA editor (ALT+F11)
    6.     the magic: Excel discovers an invalid key (DPx) and asks whether you want to continue loading the project (basically ignoring the protection)
    7.     You will be able to overwrite the password, so change it to something you can remember
    8.     Save the xls file*
    9.     Close and reopen the document and work your VBA magic!

    *NOTE: Be sure that you have changed the password to a new value, otherwise the next time you open the spreadsheet Excel will report errors (Unexpected Error), then when you access the list of VBA modules you will now see the names of the source modules but receive another error when trying to open forms/code/etc. To remedy this, go back to the VBA Project Properties and set the password to a new value. Save and re-open the Excel document and you should be good to go!

    http://stackoverflow.com/questions/1026483/is-there-a-way-to-crack-the-password-on-an-excel-vba-project

    My personal Note : Those methods written above is not applicable for .xlsm file. The easiest way is "save as" the file into old version .xls file. After that follow the methods above.