/build/static/layout/Breadcrumb_cap_w.png

Registry key is not generated on x64

I have the following bat file that is run against windows 7 x86 and x64 to grab the bios information and add it to HKLM\Hardware\Bios\Settings. However it works great on x86 but does not ever put the registry key on for x64. All the logs seem nomal with the exception of a reference to the location of cctk. I've verified cctk is in the location defined in the bat file which is C:\Program Files (x86)\Dell\CCTK\X86_64. I've tried modifing the script to HKLM64, also tried the Syswow change with no success.

I've tried a run as administrator for local system and domain\administrator with no success.

Any suggestions would be greatly appreciate.

@echo off
REM Checking for presence of the folder script will save BIOS info txt file to
IF NOT EXIST c:\script MD c:\script

REM Setting the log variable to the path for the BIOS txt file for easier calling
set log=c:\script

REM Determine OS architecture to call correct command paths
IF %processor_architecture%==AMD64 GOTO X64
IF %processor_architecture%==x86 GOTO X86
IF %processor_architecture%==x64 GOTO X64
GOTO UNK

:X86
REM On systems running x86 version of Windows changing directories and calling cctk to pull BIOS settings
REM then processing the txt file created to write the information from the file to the registry
cd "%PROGRAMFILES%"\dell\cctk\x86\
cctk.exe --lowpowers5 --wakeonlan --acpower > %log%\bios.txt
for /f "tokens=1,2 delims==" %%G in (%log%\bios.txt) DO reg add HKLM\HARDWARE\BIOS\Settings /v %%G /t REG_SZ /d %%H /f

GOTO CLEANUP

:X64
REM On systems running x64 version of Windows changing directories and calling cctk to pull BIOS settings
REM then processing the txt file created to write the information from the file to the registry
cd "%PROGRAMFILES(X86)%"\dell\cctk\x86_64\
cctk.exe --lowpowers5 --wakeonlan --acpower > %log%\bios.txt
for /f "tokens=1,2 delims==" %%G in (%log%\bios.txt) DO reg add HKLM\HARDWARE\BIOS\Settings /v %%G /t REG_SZ /d %%H /f

GOTO CLEANUP

:UNK
REM If the batch is unable to determine the OS architecture there would be OS corruption present so the batch will abort.
ECHO ERROR: Unable to determine OS Architecture, check for software issues in OS.

GOTO CLEANUP

:CLEANUP
REM Removing the folder created for storing the BIOS configuration txt file and its contents
RD /S /Q %log%
:END

0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
Posted by: ckubaska 12 years ago
Fourth Degree Brown Belt
0

Answer to this is the kbox agent is 32bit. It was reporting the OS as x86 and not x64 which is why cctk was failing. Kace changed the script to look for Program Files (x86) and it works great.

Posted by: philologist 12 years ago
Red Belt
0

As far as I know, Wow6432Node only exists for HKLM/Software.

I believe reg add has some problems dealing with 64-bit keys.

You can try launching it with reg.exe /reg:64 to get over to the 64-bit registry if that's where you need to be.

 

 


Comments:
  • Found out the script is running fine. The part that fails is cctk. I cannot get it to run manually on x64. Not sure why at this point. - ckubaska 12 years ago

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ