PENDING Powershell determine OS version

Oscar Maseko

Member
8
0
1
Hi Guys,
Please assist, i need to do the following via Powershell on SCCM

Step 1. Determine if OS is 32bit or 64bit
If 64 bit below steps need to happen

-create folder on users c drive called SAPWorkDir
- create the below registry entry

· “HKEY_LOCAL_MACHINE\Software\Wow6432Node\SAP\SAP Shared”

Create a REG_EXPAND_SZ value called “SAPWorkDir” and set the data for this value to “C:\SAPWorkDir”

If 32 bit below steps need to happen

-create folder on users c drive called SAPWorkDir
- create the below registry entry
“HKEY_LOCAL_MACHINE\Software\SAP\SAP Shared”
Create a REG_EXPAND_SZ value called “SAPWorkDir” and set the data for this value to “C:\SAPWorkDir”
 

manoharm

New Member
3
3
3
Hi Oscar Maseko,

I have attached a script inside the zip file that will:


Determine the OS architecture, whether 64 or 32 bit:

If 32 bit,
creates C:\SAPWorkDir folder and
registry item HKEY_LOCAL_MACHINE\Software\SAP\SAP Shared and also creates a new "REG_EXPAND_SZ " Value under "SAP Shared" registry entry with the Name "SAPWorkDir" and Data "C:\SAPWorkDir"

If 64 bit, creates C:\SAPWorkDir folder
and registry item HKEY_LOCAL_MACHINE\Software\Wow6432Node\SAP\SAP Shared and also creates a new "REG_EXPAND_SZ " Value under "SAP Shared" registry entry with the Name "SAPWorkDir" and Data "C:\SAPWorkDir"


Please verify it on a test machine and let me know the results :)

Thanks,
M
 

Attachments

  • Create_SAPFolderAndReg.zip
    795 bytes · Views: 2

Forum statistics

Threads
4,514
Messages
17,668
Members
9,104
Latest member
KoreBreach