Regdelete not working

(imported topic written by BenUK77791)

Hi, I’m having an issue with a simple regdelete task or fixlet.

Using a Task I have the following relevance and Action.

Relevance:

(name of operating system = “WinXP”) AND (computer name starts with “L”) and (((exists key “HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows\CurrentVersion\policies\Explorer” of registry) AND (exists value “NoViewOnDrive” of key “HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows\CurrentVersion\policies\Explorer” of registry)))

Action

regdelete "

HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\Windows\CurrentVersion\policies\Explorer

" “NoViewOnDrive”

Basically the relevance detects the machine I’m testing the action to but it dosen’t run the action and the Action history just expires.

Appears to be a simple task but do not know why it’s not running. I’ve even used the Registry wizard to confirm the correct relevance and action.

(imported comment written by BenKus)

Hey BenUK,

It looks like your syntax is correct… maybe the agent isnt responding well… can you confirm that other actions will run on this agent?

Ben

(imported comment written by BenUK77791)

Hi Ben,

Appears not and this is also after the client has been removed and reinstalled. I’ve also rebuilt the laptop and still seem unable to deploy an action to it. BigFix can see the laptop but no actions get applied.

As per above my second action was a simple action of - delete “c:\BESTEST.txt”

I’ve also tried the above RegDelete on another laptop which still didn’t apply.

Could this be a call to Support? : ).

(imported comment written by sheikh.shadab91)

Purpose: To delete a registry key which is not empty and there are subkeys inside it

delete __reg-del

delete regdel.reg

Createfile until reg-del

REGEDIT4

-HKEY_LOCAL_MACHINE\Software\Utimaco

reg-del

copy __Createfile regdel.reg

wait regedit /s regdel.reg

What is wrong with this? It says “Unable to create a file”

(imported comment written by BenKus)

Try this instead:

delete __appendfile
delete regdel.reg

appendfile REGEDIT4
appendfile -HKEY_LOCAL_MACHINE\Software\Utimaco

move __appendfile regdel.reg

wait regedit /s regdel.reg

Ben

(imported comment written by sheikh.shadab91)

Hi Ben,

Thanks for the reply. Now its shows “Failed writing to the file”. I guess I’m missing something related to createfile and appendfile. Can you help me figure this out?

Sheikh.

(imported comment written by sheikh.shadab91)

I’m trying to create a shortcut in some users desktop using the below action script

appendfile Set shell = WScript.CreateObject(“WScript.shell”)

appendfile desktopPath = shell.SpecialFolders(“Desktop”)

appendfile Set link = shell.CreateShortcut(desktopPath & “\AAA (Production).lnk”)

appendfile ’ link.Description = “Oracle Apps Shortcut”

appendfile ’ link.TargetPath = chr(34) & “C:\Program Files\Internet Explorer\IEXPLORE.EXE” & chr(34)

appendfile ’ link.IconLocation = “C:\Program Files\Internet Explorer\IEXPLORE.EXE, 0”

appendfile ’ link.Arguments = “http://trackit8/ithelpdesk/scripts/TIWebPortal/TrackItUser.asp

appendfile ’ link.WindowStyle = 3

appendfile ’ link.WorkingDirectory = desktopPath

appendfile ’ link.Save

move __appendfile makeshortcut.vbs

waithidden “{pathname of system folder & “\cscript.exe”}” makeshortcut.vbs

But its showing me “Failed writing to the file”. If I try with “createfile”, it says “Unable to create a file”. This is the same error i communicated to you in my previous posts.

Why m I getting this error? Is there some configuration issues?

(imported comment written by jessewk)

try deleting the destination of the move first command first:

delete makeshortcut.vbs

move __appendfile makeshortcut.vbs