Jump to content
Update to the Latest Version for Smooth VPN Performance ×

Modifying clients' registry via script-as-an-application does not work


Go to solution Solved by Demiad,

Recommended Posts

Posted

I have a few external clients that I cannot send updates via other means, so what I usually do is create an application (ie BAT) in KSC for them.

And this works, without a doubt. A folder can be created for instance. But - and this is the weird part - registry changes are not being made!? Take this sample script for instance:

------------------------------------------------------------

@echo off
echo Creating directory >C:\test.log 2>&1
mkdir c:\test >>C:\test.log 2>&1

echo Adding to registry >>C:\test.log 2>&1
reg add "HKLM\SOFTWARE\_test" /v "test" /d "1" /t "REG_DWORD" /f >>C:\test.log 2>&1

echo Reg with full path >>C:\test.log 2>&1
C:\Windows\System32\reg.exe add "HKLM\SOFTWARE\_test" /v "test2" /d "1" /t "REG_DWORD" /f >>C:\test.log 2>&1

------------------------------------------------------------
-> LOG indicates every command has been successfull, but only the directory was created! Nothing in the registry!

Creating directory 
Adding to registry 
Der Vorgang wurde erfolgreich beendet.

Reg with full path 
Der Vorgang wurde erfolgreich beendet.

------------------------------------------------------------

Any idea what's going on here?

URLs:
https://support.kaspersky.com/de/ksc/15.1/install/10625#block4 

https://forum.kaspersky.com/blogs/entry/43-how-to-run-bat-files-remotely-ksc-for-windows 

Posted

@Markus hello.

Did you check the following registry path?
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\_test

Posted

Ok, that's actually a good idea! Alas, no luck 🙂

I also searched the registry, but no such key was found

Posted

Thanks, I'll look into that.

I see you're using Win10; maybe that's a reason?

Posted

That worked!

I've updated to NetAgent version 16.1 and now the Reg is edited!

Now... as in your screenshot, the key will be made under "WOW6432Node", and with the "/reg:64" argument, it'll change the 64bit registry:

echo Adding to registry (located under "HKLM\SOFTWARE\WOW6432Node\")
reg add "HKLM\SOFTWARE\_test_32" /v "test" /d "1" /t "REG_DWORD" /f

echo Adding to registry (located under "HKLM\SOFTWARE\")
reg add "HKLM\SOFTWARE\_test_64" /v "test" /d "1" /t "REG_DWORD" /reg:64 /f

Thanks a bunch!!

  • Like 1
Posted

@Markus Yes, it will work.

18 минут назад, Markus сказал:
echo Adding to registry (located under "HKLM\SOFTWARE\WOW6432Node\")
reg add "HKLM\SOFTWARE\_test_32" /v "test" /d "1" /t "REG_DWORD" /f

echo Adding to registry (located under "HKLM\SOFTWARE\")
reg add "HKLM\SOFTWARE\_test_64" /v "test" /d "1" /t "REG_DWORD" /reg:64 /f

image.thumb.png.c514b6061ef44536baaba7f2452c7ed4.png

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...