Search found 590 matches

by Compo
17 Dec 2023 21:11
Forum: DOS Batch Forum
Topic: Help designing a batch file to return driver information
Replies: 6
Views: 6156

Re: Help designing a batch file to return driver information

First of all your results would not be exactly as you posted them, they would be: Microsoft PnP Utility Instance ID: USB\VID_076B&PID_3031\7&3adb5428&0&1 Device Description: OMNIKEY 3x21 Class Name: SmartCardReader Class GUID: {50dd5230-ba8a-11d1-bf5d-0000f805f530} Manufacturer Name: HID Global Stat...
by Compo
17 Dec 2023 15:28
Forum: DOS Batch Forum
Topic: Help designing a batch file to return driver information
Replies: 6
Views: 6156

Re: Help designing a batch file to return driver information

<snip /> to find the 'Matching Drivers' attribute and return the following information for each occurance of it. The information appears after the attribute as follows: - Driver Name - Original Name - Provider Name - Driver Version - Matching Device ID I would also like the 'device description' to ...
by Compo
12 Dec 2023 20:26
Forum: DOS Batch Forum
Topic: Help designing a batch file to return driver information
Replies: 6
Views: 6156

Re: Help designing a batch file to return driver information

A start would be to pipe the output through findstr.exe. %SystemRoot%\System32\pnputil.exe /enum-devices /drivers /class SmartCardReader 2>NUL | %SystemRoot%\System32\findstr.exe /RIC:"^De" /C:"^ *Driver [NV]" /C:"^ *[OMP]" /C:"^$" Obviously this would include the Outranked drivers too, (I've kept t...
by Compo
22 Mar 2023 05:06
Forum: DOS Batch Forum
Topic: [SOLVED] Unable to rework working script due to name of folder and / or removal of sign -
Replies: 7
Views: 3201

Re: Unable to rework working script due to name of folder and / or removal of sign -

To begin with, there is no need whatsoever, in your script, to be using delayed expansion. Next, as you're generating a date in a very specific format, there is no need to include code to replace all hyphens with spaces, and then remove all double spaces. All you need to do is to is to generate the ...
by Compo
07 Mar 2023 11:37
Forum: DOS Batch Forum
Topic: Generic USB Drive Letter
Replies: 10
Views: 3880

Re: Generic USB Drive Letter

I know what you're trying to do, but until you have the basic code correct, I'm not going to add more to it. You have now submitted a modified RoboCopy command line, which is still invalid/incorrect. The source and destination should not end with trailing backward slashes. In your case above you nee...
by Compo
06 Mar 2023 15:02
Forum: DOS Batch Forum
Topic: Generic USB Drive Letter
Replies: 10
Views: 3880

Re: Generic USB Drive Letter

First things first…your RoboCopy command is incorrect. Please open a Command Prompt window, type %SystemRoot%\System32\Robocopy.exe /? and press the [ENTER] key to find out its basic syntax.

Code: Select all

ROBOCOPY source destination [file]
by Compo
22 Feb 2023 11:48
Forum: DOS Batch Forum
Topic: How to replace permissions with Setacl
Replies: 3
Views: 2142

Re: How to replace permissions with Setacl

If, as seen in your GUI screenshot, the only user who has the necessary permissions to modify, (nevermind delete), this, is the current owner, TrustedInstaller. For that reason, my assumption is that only TrustedInstaller can modify the permissions, you can clearly see that SYSTEM and Administrators...
by Compo
22 Feb 2023 10:56
Forum: DOS Batch Forum
Topic: Delect Registry Key
Replies: 5
Views: 2582

Re: Delect Registry Key

The first observation I made, is that you clearly have not read the help and usage information for the command utility you are using. If you open a Command Prompt window, type reg delete /? and press the ENTER key, you'll see that there is an option which Forces the deletion without prompt. , i.e. /...
by Compo
17 Feb 2023 06:37
Forum: DOS Batch Forum
Topic: extract .7z subdirectories into the same folder of bat file
Replies: 5
Views: 2554

Re: extract .7z subdirectories into the same folder of bat file

What happens when you change %%~dpI to %%~dp0?
by Compo
16 Feb 2023 11:58
Forum: DOS Batch Forum
Topic: Exporting two keys from Registry residing in two different places on Windows 10
Replies: 9
Views: 15466

Re: Exporting two keys from Registry residing in two different places on Windows 10

Just because you are wrong, or your system is completely broken, does not mean that my advice is incorrect. Your HKEY_USERS\S-1-5-21-4151016604-2149655897-3626235661-1001 subkey is automatically mapped and mirrored, (a little like a junction / hard link), to HKEY_CURRENT_USER, when logged in. They a...
by Compo
02 Feb 2023 20:31
Forum: DOS Batch Forum
Topic: Specific Multiple delete
Replies: 6
Views: 11677

Re: Specific Multiple delete

cd /d "PC-1\J\export\corrupted\" Del *.xml *.zip *.rar *.contact *.rtf *.rar cls pause Why, did you not use the code I gave you? Not only are you likely to get an error message, because you're trying to delete all .rar files after you've already delated them, but you've made a grave mistake too. If...
by Compo
21 Jan 2023 11:02
Forum: DOS Batch Forum
Topic: Exporting two keys from Registry residing in two different places on Windows 10
Replies: 9
Views: 15466

Re: Exporting two keys from Registry residing in two different places on Windows 10

You clearly didn't read my response. Please use the reg.exe command I offered, you will almost certainly see that both keys are identical, and therefore your entire question void.
by Compo
18 Jan 2023 14:14
Forum: DOS Batch Forum
Topic: Exporting two keys from Registry residing in two different places on Windows 10
Replies: 9
Views: 15466

Re: Exporting two keys from Registry residing in two different places on Windows 10

The first thing I thought, when I saw your question was...are you sure you need to do this? Just in case you are unaware , the key HKCU is loaded from the relevant HKU\SID key at login time. It is very likely, unless you've just been messing around with your registry, that your own SID is S-1-5-21-3...
by Compo
17 Jan 2023 18:35
Forum: DOS Batch Forum
Topic: GetRegValue Default Field
Replies: 2
Views: 7344

Re: GetRegValue Default Field

Did you try using just "" as your second argument?
by Compo
17 Jan 2023 13:39
Forum: DOS Batch Forum
Topic: Specific Multiple delete
Replies: 6
Views: 11677

Re: Specific Multiple delete

Try to change to the directory first: CD /D "E:\PC1-HOME\export\corrupted" && ( Del /F /Q *.xml *.zip ) Or: CD /D "E:\PC1-HOME\export\corrupted" If ErrorLevel 0 Del /F /Q *.xml *.zip Or: CD /D "E:\PC1-HOME\export\corrupted" If %ErrorLevel% Equ 0 Del /F /Q *.xml *.zip Or: PushD "E:\PC1-HOME\export\co...