Issue with reg query in scripting.
Hello Ninjas,
If we can reg query, this would work SO much better with our setup. If not we need scripts for removal of everything else. Any help would be much appreciated.
I'm currently working on scripted installations for work from the Scripting tab in k1000. We have found utilizing this to run batch-scripts is VERY powerful, per dell support recommending it.
If we run either of the scripts as .bat files from the local desktop, not pushed from the k1000 as a script, it works just fine.
Here are two scripts. Script 1 will not work, the reg queries simply do not run.
Script 2: This is working
@echo off
MSIEXEC.EXE /X {1E26B9C2-ED08-4EEA-83C8-A786502B41E5} /qb- /norestart
echo SPSS21-Removed
net use z: \\storage
echo Connected
msiexec.exe /i "z:\storage\IBM SPSS Statistics 23.msi" /qb- INSTALLDIR="C:\Program Files\IBM" COMPANYNAME="foo" LICENSETYPE="Network" LSHOST="bar"
echo SPSS23-Installed
net use z: /d /y
If we can reg query, this would work SO much better with our setup. If not we need scripts for removal of everything else. Any help would be much appreciated.
0 Comments
[ + ] Show comments
Answers (4)
Please log in to answer
Posted by:
SMal.tmcc
5 years ago
Posted by:
andycorps
5 years ago
This is a little old... but I knocked out a reasonably neat solution for uninstalling all old versions using their GUIDs that seems to work OK. First compile a text file containing all the GUIDs you want to remove (including the {}'s)
Then put a script with the following in the same folder:
FOR /f "delims=" %%G in (%~dp0SolidWorksGUID.txt) DO reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%G && MSIEXEC.EXE /x %%G /qn
I'm using it to remove several years worth of Solidworks (and its various components) before installing the latest...
Posted by:
rad33k
7 years ago
If your 'reg query' command needs to reach out 64bit registry, you should try with:
"%WINDIR%\SYSNATIVE\REG.EXE" as it seems that K1000 agent works in a 32bit environment (I'm guessing, I've never used K1000 but this helped in this question).
"%WINDIR%\SYSNATIVE\REG.EXE" as it seems that K1000 agent works in a 32bit environment (I'm guessing, I've never used K1000 but this helped in this question).
Posted by:
anonymous_9363
7 years ago