SCCM | Intune | Windows 365 | Autopilot | Windows 11 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 own topics and posts, as well as connect with other members. Please post your questions in the correct category.

PENDING Powershell determine OS version

Oscar Maseko

Member
Messages
8
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

  • Create_SAPFolderAndReg.zip
    795 bytes · Views: 6

Forum statistics

Threads
6,376
Messages
24,977
Members
15,109
Latest member
pleroy
Back
Top