java_runtime template
Verfasst: 05 Aug 2014, 22:55
Good afternoon everyone:
I had been running into problems installing java on my Windows 8 machines using the existing opsi script I had. So I looked on the user scripts and have started using the one labeled java_runtime. (The other one there seems great but like a lot of overkill for me at this point).
The one I'm using is here:
wiki/userspace:java_runtime
It installs just fine but I was actually trying to get the delsub to work -- and in there, I'm getting an error in the for loop. During the opsi install it tells me that I shouldn't use a pre-defined variable. I've tried re-copying and re-pasting but that didn't seem to help anything. I tried changing it to use a %variable% like the examples in the manual use -- then setting a variable to the value in %variable% and that also didn't appear to work. This seems like it would be a really elegant way of handling uninstalls if I can get it working (for this and other products).
Anyone else have something like this working? Am I missing something obvious?
This is what is throwing the error:
Set $result$ = getRegistryKeyList64("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
for $app$ in $result$ do Sub_searchApp64
if not ($UninstallCommandList$ = "")
set $result1$ = splitString($UninstallCommandList$,"::")
for $UninstallCommand$ in $result1$ do Winbatch_uninstall_64 /64Bit
sub_check_exitcode
endif
Thanks all!
Brent
I had been running into problems installing java on my Windows 8 machines using the existing opsi script I had. So I looked on the user scripts and have started using the one labeled java_runtime. (The other one there seems great but like a lot of overkill for me at this point).
The one I'm using is here:
wiki/userspace:java_runtime
It installs just fine but I was actually trying to get the delsub to work -- and in there, I'm getting an error in the for loop. During the opsi install it tells me that I shouldn't use a pre-defined variable. I've tried re-copying and re-pasting but that didn't seem to help anything. I tried changing it to use a %variable% like the examples in the manual use -- then setting a variable to the value in %variable% and that also didn't appear to work. This seems like it would be a really elegant way of handling uninstalls if I can get it working (for this and other products).
Anyone else have something like this working? Am I missing something obvious?
This is what is throwing the error:
Set $result$ = getRegistryKeyList64("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall")
for $app$ in $result$ do Sub_searchApp64
if not ($UninstallCommandList$ = "")
set $result1$ = splitString($UninstallCommandList$,"::")
for $UninstallCommand$ in $result1$ do Winbatch_uninstall_64 /64Bit
sub_check_exitcode
endif
Thanks all!
Brent