Jump to content


  • 0
thoffman

Task Sequence Command Line Delete Registry Error

Question

This is a little off topic from my last post, was wanted to start a new one.

 

I have some 64bit keys in the registry that need deleted, and it seems like since the SCCM client launches in 32bit mode it can't handle the call to a 64bit cmd during the script to delete the keys that I believe are 64bit keys.(i'm guessing these are 64 bit calls, I can't see any other reason why it won't delete these keys) The script deletes most of the keys except for these.

 

I tried running the following commands in a custom task sequence with *Disable 64-bit file system redirection" turned off without any luck. (there are multiple keys in the tree i'm trying to delete, do I need to delete each individual key instead of the tree?)

 

reg delete HKLM\SOFTWARE\TrendMicro /f

reg.exe delete HKLM\SOFTWARE\TrendMicro

cmd.exe /c reg delete HKLM\SOFTWARE\TrendMicro /f

 

I found the following for some 64 bit cmd call functions, but couldn't figure out how to make these work in windows much less sccm.

 

%windir%\syswow64\cmd.exe /c %windir%\sysnative\reg.exe

 

If I run a call to reg.exe and refer to a .reg file will this work? Not sure why this is giving me so much trouble.

 

 

Here are the Task Sequence Logs -

 

Set a global environment variable _SMSTSLogPath=C:\Windows\CCM\Logs\SMSTSLog TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
Expand a string: smsswd.exe /run: reg delete HKLM\SOFTWARE\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro_Volatile /f TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
Expand a string: TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
Start executing the command line: smsswd.exe /run: reg delete HKLM\SOFTWARE\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro_Volatile /f TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
!--------------------------------------------------------------------------------------------! TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
Expand a string: WinPEandFullOS TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
Executing command line: smsswd.exe /run: reg delete HKLM\SOFTWARE\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro_Volatile /f TSManager 9/27/2014 1:11:14 PM 5248 (0x1480)
[ smsswd.exe ] InstallSoftware 9/27/2014 1:11:14 PM 2944 (0x0B80)
PackageID = '' InstallSoftware 9/27/2014 1:11:14 PM 2944 (0x0B80)
BaseVar = '', ContinueOnError='' InstallSoftware 9/27/2014 1:11:14 PM 2944 (0x0B80)
ProgramName = 'reg delete HKLM\SOFTWARE\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro /f reg delete HKLM\SOFTWARE\Wow6432Node\TrendMicro_Volatile /f' InstallSoftware 9/27/2014 1:11:14 PM 2944 (0x0B80)
SwdAction = '0001' InstallSoftware 9/27/2014 1:11:14 PM 2944 (0x0B80)
Getting linked token InstallSoftware 9/27/2014 1:11:14 PM 2944 (0x0B80)
Working dir 'not set' InstallSoftware 9/27/2014 1:11:15 PM 2944 (0x0B80)
Executing command line: Run command line InstallSoftware 9/27/2014 1:11:15 PM 2944 (0x0B80)
Process completed with exit code 1 InstallSoftware 9/27/2014 1:11:15 PM 2944 (0x0B80)
ERROR: Invalid syntax. InstallSoftware 9/27/2014 1:11:15 PM 2944 (0x0B80)
Type "REG DELETE /?" for usage. InstallSoftware 9/27/2014 1:11:15 PM 2944 (0x0B80)
Command line returned 1 InstallSoftware 9/27/2014 1:11:15 PM 2944 (0x0B80)
Process completed with exit code 1 TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
!--------------------------------------------------------------------------------------------! TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Failed to run the action: Run Command Line.
Incorrect function. (Error: 00000001; Source: Windows) TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Set authenticator in transport TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Set a global environment variable _SMSTSLastActionRetCode=1 TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Set a global environment variable _SMSTSLastActionSucceeded=false TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Clear local default environment TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Failed to run the action: Run Command Line. Execution has been aborted TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Set authenticator in transport TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Failed to run the last action: Run Command Line. Execution of task sequence failed.
Incorrect function. (Error: 00000001; Source: Windows) TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Set authenticator in transport TSManager 9/27/2014 1:11:15 PM 5248 (0x1480)
Task Sequence Engine failed! Code: enExecutionFail TSManager 9/27/2014 1:13:06 PM 5248 (0x1480)
**************************************************************************** TSManager 9/27/2014 1:13:06 PM 5248 (0x1480)
Task sequence execution failed with error code 80004005 TSManager 9/27/2014 1:13:06 PM 5248 (0x1480)

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0

I figured it out! I added this to my batch file and the batch file it calls on and it finally successfully removed trend. I need to do more testing, but I think it finally works.

 

@ECHO OFF
IF NOT "%PROCESSOR_ARCHITEW6432%"=="AMD64" GOTO native
ECHO "Re-launching Script in Native Command Processor..."
%SystemRoot%\Sysnative\cmd.exe /c %0 %*
EXIT
:native
ECHO "Running Script in Native Command Processor..."
REM Your script starts here

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.