Showing posts with label Unable. Show all posts
Showing posts with label Unable. Show all posts

May 23, 2023

Change default directory for Windows command prompt and Powershell when running with admin privileges

 Hi all,

It's been a while since I posted things.

Here is my previous post where the non-admin user changes the default directory for the command prompt and PowerShell.

https://psrdotcom.blogspot.com/2022/03/change-default-directory-of-windows.html

But in this post, I will be explaining about running the command prompt / powershell with admin rights and setting the default directory. Because, when you are running with admin privileges, it by default goes to the SYSTEM32 folder of Windows.

Environment

I use the command prompt and PowerShell, which are pinned to the taskbar of Windows.

Run the application with the admin rights

  • Right-click on the application icon -> click on Properties
  • Go to the "Compatibility" tab
  • Check "Run this program as administrator"

Run the shortcut with the admin rights

  • Right-click on the shortcut icon -> click on Properties
  • Go to the "Shortcut" tab
  • Click on the "Advanced" button
  • Check "Run this program as administrator"

Change the command prompt default directory

  • We need to have a .bat file with the following content
    • @echo off
    • cd <default_directory>
Now use the .bat file in the shortcut properties
  • Right-click on the shortcut icon -> click on Properties
  • Go to the "Shortcut" tab
  • In the "Target" field append the below text
    • /k "batfile_dirpath\batfile.bat"

Change the PowerShell default directory

  • Right-click on the shortcut icon -> click on Properties
  • Go to the "Shortcut" tab
  • In the "Target" field append the below context after powershell.exe
    • -NoExit -command "& {Set-Location <default_directory>}"
  • Click on "OK"

Hope, this helps you to reduce the frequent directory changes in the command prompt and PowerShell.

Feel free to provide your valuable feedback and comments to psrdotcom@gmail.com

December 30, 2016

Windows file name too long to delete move copy rename due to destination path too long

Hi friends,

Problem

When i am clearing my old windows folder from the OS installed drive, I had an issue of deleting the files and folder because the path name is too long.

The error message is

"Destination Path Too Long.

The file name(s) would be too long for the destination folder. You can shorten file name and try again, or try a location that has a shorter path."

Background

Windows OS will allow the file path to be max 255 characters. If any file or folder path is beyond 255 characters, you will not be able to perform any file actions like delete / move / copy / rename.

Solution


  1. Navigate to the folder in the windows explorer
  2. Type the following command in the address bar and hit enter key
    • subst j:
  3. Open a new windows explorer window
  4. Now you will be able to see new drive with letter J:
  5. You will be able to delete the files/folders with in the drive
  6. To delete the other files, navigate to the parent folder and delete one after one or multiple folders path at a time.


Please send your feedback or suggestions to psrdotcom@gmail.com

December 13, 2016

E Aadhaar password for mail copy PDF received from aadhaar@uidai.gov.in

Hi friends,

I have updated my Aadhaar details from Aadhaar update center.
It is mentioned that within 72 hours, my details will be updated.

Before 72 hours of my updated application, I had received an email from aadhaar@uidai.gov.in with an attachment which is password protected.

As I was unable to find the password to open the file in the sent mail, I have googled to find the answer. I have found mulitple options. You can try the following procedure to open the file with your password.

Procedure to open the document


  1. Download the file
  2. Rename the file by adding .pdf extension, if missing
  3. Try the following passwords
    • Password length is 8 characters
      • First 4 characters of your name as mentioned in Aadhaar card (All small letters)
      • Next 4 characters are your year of birth which is mentioned in Aadhaar card
    • Password length is 6 characters
      • Pin code of your address as per Aadhaar records
      • Pin code of your enrolled area where you have applied the Aadhaar card
  4. For me, 8 character password (first 4 characters of my name as mentioned in Aadhaar card + year of birth) worked.
Please send your feedback and queries to psrdotcom@gmail.com

November 17, 2015

Unable to open WebEx issue on Windows 10 solution

Hi all,
I was facing an issue with opening WebEx on my Windows 10. I found the solutions from different sources and wants to share with you.

Procedure

  1. Open the WebEx link in IE
  2. Press F12 (Development Tools) on keyboard or from settings icon from top right corner IE
  3. Navigate to “Emulation” tab
  4. Select “Document Mode” as 9
  5. Select “User agent string” as 9
  6. Browser automatically refreshes
  7. Now, you try to join/start the meeting
  8. It should open the WebEx application

Please find the relevant screenshot to do the configuration

 
 
Please send your comments and feedback to psrdotcom@gmail.com
Visit my personal website http://pillisureshraju.in for Java and Android tutorials

May 08, 2012

Micro SD Card, Unable to Format, Write Protected

Hi friends,

One more issue with some precaution. My friend formatted his micro-sd card and trying to copy the files from computer to sd card using card reader. The files aren't copying into the sd card. We tried to format the drive and it was showing an error in windows like "Windows was unable to format the drive".

We tried to format the drive on Linux, Mac also. Tried to use "dd" command to write random data in it. It was automatically disconnecting from PC/Mac. i.e. The drive is not accessible after sometime.

Then we have come to one conclusion that "Never, Ever format your sd card from the phone". It will not be accessible by the PC/Mac.

We tried to use the same SD Card in Samsung mobile also. It was detected and formatted from the Samsung phone too. It was formatted successfully. But when we were trying to copy some files to the sd card, It says "Drive location is accessible".

Lesson: "Don't format your micro-sd card from phone"

If anyone knows, how to solve this problem, please let me know.

Send your feedback to psrdotcom@gmail.com

Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com