Windows cmd are you sure

on boot cmd window C:\windows\syswow64\*, are you sure (y/n) — why and what do I do?

On booting to Windows seven a command window pops up with the text » C:\windows\syswow64\*, are you sure (y/n)» Also the computer has been slowing down to a crawl at times and on the internet or in mail the cursor will slow — often not moving or entering text until a little while after texted. I am not sure what to do about this. I have run MS essentials scan and spybot with no results.

Are you aware of any hardware or software changes made any on the PC prior to this issue?

It could be possible that some system files are corrupted or some third-party program causing this issue.

Please follow these methods and check if it helps.

Method 1:
Use the System File Checker tool to repair missing or corrupted system files.
http://support.microsoft.com/kb/929833/en-us

Method 2:

I would suggest you to place the computer in a clean boot state. You can start Windows by using a minimal set of drivers and startup programs. This kind of startup is known as a «clean boot.» A clean boot helps eliminate software conflicts.

To set the computer in clean boot, follow the steps from the link: How to perform a clean boot

Important: After you have finished troubleshooting, follow these steps from section “How to reset the computer to start as usual after clean boot troubleshooting” to reset the computer to start as usual.

Refer to the article.
Windows 7 hangs or freezes
https://support.microsoft.com/kb/2681286/en-us
Note: The Microsoft Safety Scanner expires 10 days after being downloaded. To rerun a
scan with the latest anti-malware definitions, download and run the Microsoft
Safety Scanner again.

Let us know if it helps. If the issue persists, we will be happy to help you further.

14 команд CMD, которые должен знать каждый пользователь

Assoc

Большинство пользовательских файлов в операционной систем связаны с определёнными программами, которые обрабатывает их по умолчанию. Такая связь называется ассоциацией. Для её просмотра как раз и существует команда assoc. При её выполнении выводится список сопоставлений расширений и типов файлов. А ещё команда assoc позволяет изменять ассоциации.

Например командой assoc .html = txtfile для файлов с расширением HTML устанавливается тип файла txtfile (текстовый). Если же вам нужно узнать какой именно программой открываются файлы с таким расширением, используйте команду:

Cipher

Эта команда предназначается для шифрования и дешифрования данных на дисках с файловой системой NTFS, но с таким же успехом она может использоваться для зачистки свободного дискового пространства. Пользоваться ей очень просто. Если вам нужно гарантированно удалить остатки всех ранее удалённых файлов на диске D, выполните в консоли команду:

Driverquery

Полезная команда позволяющая просмотреть список всех установленных в операционной системе драйверов. При выполнении команды без параметров данные выводятся в виде отсортированного списка. Колонка «Модуль» содержит имена драйверов без расширения, колонка «Название» включает краткое описание драйвера, «Тип драйвера» — соответственно тип, «Дата ссылки» указывает на дату установки или последней модификации драйвера.

FC (File Compare)

Команда FC пригодится в основном кодерам, также она может использоваться теми юзерами, которым приходится работать с текстовыми файлами. Эта команда позволяет сравнивать содержимое двух файлов, отыскивая между ними несоответствия. Допустим, у вас имеются два файла file1.docx и file2.docx и вы хотите их сравнить. Выполните в консоли следующую команду:

В данном примере мы сравнили два простых текстовых документа. Интерпретатор командной строки нашел несоответствие в одном из предложений и указал конкретное место. Команда FC также позволяет сравнивать бинарные файлы, файлы в кодировке юникод, определять число несоответствий и т.п. Если сравниваемые файлы окажутся идентичными, при выполнении команды FC будет выведено соответствующее сообщение.

Читайте также:  Ноутбук не видит беспроводную сеть windows

Ipconfig

Полезная команда позволяющая определить текущие настройки протокола TCP/IP или попросту IP-адрес. Однако показывает она только внутренний IP-адрес, если же вы используете роутер и хотите узнать тот IP, с которым вы выходите в глобальную Сеть, лучше обратиться к помощи специальных онлайновых сервисов типа 2ip.ru.

Netstat

Эта команда выводит список всех текущих интернет-соединений. Используется она в основном администраторами для отображения TCP и UDP-соединений, прослушиваемых портов, таблиц маршрутизации и статистических данных для различных протоколов. Также может использоваться для поиска следов, оставляемых вирусами и прочими вредоносными объектами. Выполненная без параметров команда Netstat отображает тип соединения, локальный адрес, внешний адрес и текущее состояние.

Как и Netstat команда ping используется в основном системными администраторами. Служит она для диагностики компьютерных сетей. С её помощью можно определять доступность тех или иных ресурсов. Допустим вам нужно проверить доступность Google. Поскольку DNS сервер Google имеет адрес 8.8.8.8, в консоли CMD нужно выполнить команду ping 8.8.8.8.

Цифровой IP-адрес также может быть заменён текстовым URL-адресом — ping google.com. Если узел окажется недоступен будет выведено сообщение «превышен лимит ожидания», а количество потерь при этом составит 100 процентов.

Tracert

Ещё одна «сетевая» команда, предназначенная для диагностики сети (трассировки). Команда позволяет получить цепочку узлов, через которые проходит IP-пакет, адресованный конечному узлу. Используется системными администраторами для выявления неполадки, препятствующей доставке пакетов конечному узлу. Примером использования команды может послужить трассировка к узлу того же Google: tracert google.com.

Pathping

Работает эта команда примерно так же как и tracert, но в отличие от последней является более функциональной. Команда выполняет трассировку плюс отправку запросов на промежуточные узлы маршрута для сбора информации о задержках и потерях пакетов на каждом из них.

Powercfg

Мощная утилита командной строки, предназначенная для управления параметрами электропитания Windows. Выполняется только с параметрами. Выполненная с ключом /Q команда Powercfg выводит текущую конфигурацию схемы электропитания, с ключом /a выводит отчет об использовании электроэнергии в ноутбуках, с ключом –energy генерирует детальный текстовый лог о состоянии компонентов компьютера, включая аккумуляторные батареи. Также команда Powercfg может использоваться для создания резервных копий настроек электропитания и развёртывания их на новом оборудовании.

Shutdown

Эта команда используется для завершения сеанса пользователя, выключения, перезагрузки и перевода компьютера в режим гибернации. Поддерживает удалённое управление. Выполняется shutdown всегда с параметрами. Например, команда вида shutdown /s /t 0 приведёт к завершению работы открытых приложений и немедленному выключению компьютера. Посмотреть список доступных ключей можно выполнив в консоли shutdown /?.

Sfc (System File Checker)

Одна из самых полезных и нужных команд. Предназначается для обнаружения и восстановления повреждённых или модифицированных системных файлов Windows. Восстановление производится из резервных копий создаваемых самой операционной системой. Чтобы запустить сканирование системы с последующим восстановлением файлов выполните команду sfc с параметром /scannow. После завершения проверки потребуется перезагрузка компьютера. Выполнять эту команду нужно в консоли, запущенной от имени администратора.

Tasklist

Команда Tasklist делает ту же работу, что и Диспетчер задач. Выполненная без параметров она выводит список всех запущенных процессов выполняющихся на локальном или удалённом компьютере. При этом для каждого процесса отображается его название, идентификатор (PID), имя сессии, номер сеанса и выделенный объём оперативной памяти. Команда Tasklist поддерживает использование ключей и фильтров. Например, Tasklist /SVC выводит список процессов вместе со службами для каждого процесса в отдельности.

equivalent of rm and mv in windows .cmd

I have the following in a shell script,I want to convert the following lines into a windows cmd file..can anyone provide inputs on what is the equivalent for «rm» and «mv» in windows cmd file.

3 Answers 3

move in windows is equivalent of mv command in Linux

del in windows is equivalent of rm command in Linux

move and del ARE certainly the equivalents, but from a functionality standpoint they are woefully NOT equivalent. For example, you can’t move both files AND folders (in a wildcard scenario) with the move command. And the same thing applies with del .

The preferred solution in my view is to use Win32 ports of the Linux tools, the best collection of which I have found being here.

mv and rm are in the CoreUtils package and they work wonderfully!

If you want to see a more detailed discussion of differences for the commands, see the Details about Differences section, below.

Читайте также:  Нужен ли для windows 10 антивирусников

From the LeMoDa.net website 1 (archived), specifically the Windows and Unix command line equivalents page (archived), I found the following 2 . There’s a better/more complete table in the next edit.

I’m interested to hear from @Dave and @javadba to hear how equivalent the commands are — how the «behavior and capabilities» compare, whether quite similar or «woefully NOT equivalent».

All I found out was that when I used it to try and recursively remove a directory and its constituent files and subdirectories, e.g.

gave me a standard Windows-knows-better-than-you-do-are-you-sure message and prompt

and that when I typed Y , the result was that my top directory and its constituent files and subdirectories went away.

Edit

I’m looking back at this after finding this answer. I retried each of the commands, and I’d change the table a little bit.

If you want the equivalent for

or, as the author of the answer I sourced described,

But there is another «old school» way to do it that was used back in the day when commands did not have options to suppress confirmation messages. Simply ECHO the needed response and pipe the value into the command.

echo y | rmdir /s

Details about Differences

I tested each of the commands using Windows CMD and Cygwin (with its bash ).

Before each test, I made the following setup.

That resulted in the following file structure for both.

Here are the results. Note that I’ll not mark each as CMD or bash ; the CMD will have a > in front, and the bash will have a $ in front.

RMDIR /S /Q and RM -R ; RM -RF

RMDIR /S AND RM -RI Here, we have a bit of a difference, but they’re pretty close.

I’M HOPING TO GET A MORE THOROUGH MOVE AND MV TEST

Notes

  1. I know almost nothing about the LeMoDa website, other than the fact that the info is

and that there seem to be a bunch of useful programming tips along with some humour (yes, the British spelling) and information on how to fix Japanese toilets. I also found some stuff talking about the «Ibaraki Report», but I don’t know if that is the website.

I think I shall go there more often; it’s quite useful. Props to Ben Bullock, whose email is on his page. If he wants me to remove this info, I will.

I will include the disclaimer (archived) from the site:

Disclaimer Please read the following disclaimer before using any of the computer program code on this site.

There Is No Warranty For The Program, To The Extent Permitted By Applicable Law. Except When Otherwise Stated In Writing The Copyright Holders And/Or Other Parties Provide The Program “As Is” Without Warranty Of Any Kind, Either Expressed Or Implied, Including, But Not Limited To, The Implied Warranties Of Merchantability And Fitness For A Particular Purpose. The Entire Risk As To The Quality And Performance Of The Program Is With You. Should The Program Prove Defective, You Assume The Cost Of All Necessary Servicing, Repair Or Correction.

In No Event Unless Required By Applicable Law Or Agreed To In Writing Will Any Copyright Holder, Or Any Other Party Who Modifies And/Or Conveys The Program As Permitted Above, Be Liable To You For Damages, Including Any General, Special, Incidental Or Consequential Damages Arising Out Of The Use Or Inability To Use The Program (Including But Not Limited To Loss Of Data Or Data Being Rendered Inaccurate Or Losses Sustained By You Or Third Parties Or A Failure Of The Program To Operate With Any Other Programs), Even If Such Holder Or Other Party Has Been Advised Of The Possibility Of Such Damages.

How to open an elevated cmd using command line for Windows?

How do I open a elevated command prompt using command lines on a normal cmd?

For example, I use runas /username:admin cmd but the cmd that was opened does not seem to be elevated! Any solutions?

24 Answers 24

I ran into the same problem and the only way I was able to open the CMD as administrator from CMD was doing the following:

  1. Open CMD
  2. Write powershell -Command «Start-Process cmd -Verb RunAs» and press Enter
  3. A pop-up window will appear asking to open a CMD as administrator
Читайте также:  Arch linux установка steam

I don’t have enough reputation to add a comment to the top answer, but with the power of aliases you can get away with just typing the following:

This is just a shorter version of user3018703 excellent solution:

According to documentation, the Windows security model.

does not grant administrative privileges at all times. Even administrators run under standard privileges when they perform non-administrative tasks that do not require elevated privileges.

You have the Create this task with administrative privileges option in the Create new task dialog (Task Manager > File > Run new task), but there is no built-in way to effectively elevate privileges using the command line.

However, there are some third party tools (internally relying on Windows APIs) you can use to elevate privileges from the command line:

NirCmd:

  1. Download it and unzip it.
  2. nircmdc elevate cmd

windosu:

  1. Install it: npm install -g windosu (requires node.js installed)
  2. sudo cmd

Simple way I did after trying other answers here

Method 1: WITHOUT a 3rd party program (I used this)

  1. Create a file called sudo.bat (you can replace sudo with any name you want) with following content powershell.exe -Command «Start-Process cmd \»/k cd /d %cd%\» -Verb RunAs»
  2. Move sudo.bat to a folder in your PATH ; if you don’t know what that means, just move these files to c:\windows\
  3. Now sudo will work in Run dialog ( win+r ) or in explorer address bar (this is the best part :))

Method 2: WITH a 3rd party program

  1. Download NirCmd and unzip it.
  2. Create a file called sudo.bat (you can replace sudo with any name you want) with following content nircmdc elevate cmd /k «cd /d %cd%»
  3. Move nircmdc.exe and sudo.bat to a folder in your PATH ; if you don’t know what that means, just move these files to c:\windows\
  4. Now sudo will work in Run dialog ( win+r ) or in explorer address bar (this is the best part :))

I use nirsoft programs (eg nircmdc) and sysinternals (eg psexec) all the time. They are very helpful.

But if you don’t want to, or can’t, dl a 3rd party program, here’s another way, pure Windows.

Short answer: you can while elevated create a scheduled task with elevated privileges which you can then invoke later while not elevated.

Middle-length answer: while elevated create task with (but I prefer task scheduler GUI):

Then later, no elevation needed, invoke with

The following as a batch file will open an elevated command prompt with the path set to the same directory as the one from where the batch file was invoked

My favorite way of doing this is using PsExec.exe from SysInternals, available at http://technet.microsoft.com/en-us/sysinternals/bb897553

The «-h» switch is the one doing the magic:

-h If the target system is Vista or higher, has the process run with the account’s elevated token, if available.

While both solutions provided by Dheeraj Bhaskar work, unfortunately they will result in the UAC dialog showing up on top (z-order-wise) but not getting focused (the focused window is the caller cmd/powershell window), thus I either need to grab the mouse and click «yes», or to select the UAC window using Alt+Shift+Tab. (Tested on Win10x64 v1607 build14393.447; UAC = «[. ] do not dim [. ]».)

The following solution is a bit awkward as it uses two files, but it preserves the correct focus order, so no extra mouse / keyboard actions are required (besides confirming the UAC dialog: Alt+Y).

  1. cmdadm.lnk (shortcut properties / Advanced. / Run as administrator = ON) %SystemRoot%\System32\cmd.exe /k «cd /d»
  2. su.bat @start cmdadm.lnk %cd%

I’ve been using Elevate for awhile now.

It’s description — This utility executes a command with UAC privilege elevation. This is useful for working inside command prompts or with batch files.

I copy the bin.x86-64\elevate.exe from the .zip into C:\Program Files\elevate and add that path to my PATH .

Then GitBash I can run something like elevate sc stop W3SVC to turn off the IIS service.

Running the command gives me the UAC dialog, properly focused with keyboard control and upon accepting the dialog I return to my shell.

Оцените статью