Hello, I have the download file in .aspx which contains registry editor. I would like to upload this to VSA agent procedure and push it out to the 20 machines.
The aspx file looks like this:
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319]"SchUseStrongCrypto"=dword:00000001[HKEY_LOCAL_MACHINE\SYSTEM\Wow643Node\Microsoft\.NETFramework\v4.0.30319]"SchUseStrongCrypto"=dword:00000001
I am not sure how to run that .aspx file once its on the machines. Is there a way for me to convert this file to the acceptable exe file for VSA? If not, do I need to write a custom script to append the registry editor?
Any help is greatly appreciated!!
aspx is a web scripting file. Technically it is the presentation half of a scripting file. In other words, it doesn't execute, a web browser parses it to present information. That said, a file extension is just a helper for the operating system to know what application to use to open the file; it is more of a shortcut for open application and go to File -> Open. Point being, it doesn't actually mean anything. Point being, you probably just need to rename the file to the a different extension.
To me, that looks like the output a "reg.exe export" command. In which case, you would want to use a "reg.exe import" command or rename the file with a reg extension.
Personally, I've never liked pushing down a reg file, especially for setting two values. I would just use two separate lines:
executeShellCommand("reg.exe add "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" /v SchUseStrongCrypto /t REG_DWORD /d 1 /f")
executeShellCommand("reg.exe add "HKLM\SYSTEM\Wow643Node\Microsoft\.NETFramework\v4.0.30319" /v SchUseStrongCrypto /t REG_DWORD /d 1 /f")
Something like that. My recommendation would be researching how to set registry values from the command line first. Then worry about getting them in an agent procedure.
I tested the command line you gave me and they both worked locally, so I created the agent procedure and it goes this:
executeShellCommand("REG ADD "HKLM\SOFTWARE\WOW6432Node\Microsoft\.NETFramework\v4.0.30319" /v SchUseStrongCrypto /t REG_DWORD /d 1 /f, "Execute as System", "All Operating System", "Halt on Fail")
executeShellCommand("REG ADD "HKLM\SOFTWARE\Microsoft\.NETFramework\v4.0.30319" /v SchUseStrongCrypto /t REG_DWORD /d 1 /f, "Execute as System", "All Operating System", "Halt on Fail")
The First execute command succeed but the Second execute command did not. I ran the Second execute command alone and it did not work. I ran the First execute command alone and it worked. I ran them both locally on the testing machine and they both worked.
Is there a reason for the Second execute command not working in the agent procedure? I disabled the Anti-Virus and it still did not work.