SCCM | Intune | Windows 11 Forums

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING Powershell determine OS version

Oscar Maseko

Member
Messages
8
Reaction score
0
Points
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”
 
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

Back
Top