Link to home
Create AccountLog in
Microsoft DOS

Microsoft DOS

--

Questions

--

Followers

Top Experts

Avatar of Casedesign
Casedesign🇺🇸

Delete Registry Folder .bat file Error
I'm try to push out a .bat file to delete 3 registry folders, Nemetschek, VectorWorks, and Nemestschek.  It works prefectly ok when I run the .bat file from my desktop.  When I push it out to a machine I get an "error:  The system was unable to find the specified registry key or value"
I can't understand what the problem is.  Any help is greatly appreciated.  These are the command that is in my .bat file.  

reg delete HKEY_CURRENT_USER\Software\Nemetschek /f
reg delete HKEY_CURRENT_USER\Software\VectorWorks /f
reg delete HKEY_LOCAL_MACHINE\Software\Nemetschek /f

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Peter HartPeter Hart🇬🇧

whatdo you mean 'push it to a machine' ?   are you executing the bat file from your console remotely? or do you have a  VPN connection to the remote machine or is the bat file excuted at startup?

Hi,

Do the other users definately have these reg keys???

Also, take a look at

http://support.microsoft.com/kb/823468

Cheers,

Bob...

Avatar of CasedesignCasedesign🇺🇸

ASKER

I'm using Altiris to Initiate the action.  

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of augwestaugwest🇺🇸

Simply puting a - in the key name will remove it here is an example


[-HKEY_CLASSES_ROOT\.fts\ShellNew]

[-HKEY_CLASSES_ROOT\.dft\ShellNew]

[-HKEY_CLASSES_ROOT\.pm6\ShellNew]

[-HKEY_CLASSES_ROOT\.p65\ShellNew]

export the key from your registry and add the - before it this removes it

Avatar of CasedesignCasedesign🇺🇸

ASKER

Yes, the files are in the registry of the other user computers.

Avatar of CasedesignCasedesign🇺🇸

ASKER

[-HKEY_CURRENT_USER\Software\Nemetschek] /f
[-HKEY_CURRENT_USER\Software\VectorWorks] /f
[-HKEY_LOCAL_MACHINE\Software\Nemetschek] /f

When I tried using the above in my .bat file.  I get a "The system cannot find the path specified" error.  

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of igor-1965igor-1965🇨🇿

Maybe a wrong syntax of the command. Try these ones:

reg delete HKCU\Software\Nemetschek /f
reg delete HKCU\Software\VectorWorks /f
reg delete HKCU\Software\Nemetschek /f

Hope it helps

Avatar of igor-1965igor-1965🇨🇿

Sorry, these ones:

reg delete HKCU\Software\Nemetschek /f
reg delete HKCU\Software\VectorWorks /f
reg delete HKLM\Software\Nemetschek /f

Avatar of QlemoQlemo🇩🇪

HKEY_Current_User might not be defined or pointing to the wrong user - if this runs in a system account, for example.
If so, you've got a problem. The batch file needs to run under the according account on each machine.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of CasedesignCasedesign🇺🇸

ASKER

that works just fine when I double click it from the desktop, but when I use Altiris Deployment Solution to push it out to the machine I get the "system was unable to find the specified registry key or value"

Avatar of QlemoQlemo🇩🇪

Well, yes, the hive name has to be abbreviated (HKLM, HKCU, HKU, ...).

Avatar of CasedesignCasedesign🇺🇸

ASKER

Well at least I narrowed down the solution.  From Qlemo's quote, I tired using the user account that is associated with the computer and that worked.  My problem now trying to figure out which account to use.  

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of augwestaugwest🇺🇸

Can you split this up into two deployments, one that happens on user login for the Current user ones, and for the local machine one on system reboot this could solve your issue

Avatar of CasedesignCasedesign🇺🇸

ASKER

What I really need is some command to delete all hkcu folders from below.  


reg delete HKCU\Software\Nemetschek /f
reg delete HKCU\Software\VectorWorks /f
reg delete HKCU\Software\Nemetschek /f

Avatar of igor-1965igor-1965🇨🇿

You won't achieve it with Altiris. To delete keys from HKEY_CURRENT_USER you have to use login scripts. I think it is the only solution.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


ASKER CERTIFIED SOLUTION
Avatar of QlemoQlemo🇩🇪

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of CasedesignCasedesign🇺🇸

ASKER

the sid thing worked, this one goes to you.
Microsoft DOS

Microsoft DOS

--

Questions

--

Followers

Top Experts

Microsoft Disk Operating System (MS-DOS) was an operating system for x86-based personal computers, and traces of it are still found in the Windows operating system. DOS is still used in some embedded systems and for certain legacy 16-bit networks.