Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Built-in WPI Functions

Featured Replies

Where is the list of all available Built-in WPI Functions and there acceptable commands? The manual only gives a few and does not give all acceptable parameters (i.e. getOSVer()=="2000" is not even there, but it works). The PRIMARY reason I ask for this is because I am looking for a function that can tell me if the OS is x86 or x64

Does such a command exist? If not, I was thinking of using the RegKeyValue or RegKeyExists entries but am not sure where to look...

Your thoughts? Thanks!

  • Author

Found a way:

x86

RegKeyValue("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")=="x86"

x64

RegKeyValue("HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE")=="AMD64"

Using VBScript, you can do it like this:

sub EnsureNativeScriptEngine

On Error resume next
dim WshShell,WshProcEnv,process_architecture
Set WshShell = CreateObject("WScript.Shell")
Set WshProcEnv = WshShell.Environment("Process")
process_architecture= WshProcEnv("PROCESSOR_ARCHITECTURE")
end sub

I notice you closed the 'suggestions' topic. I had a couple of ideas I wanted to bounce off of you (one of them was this)

One idea I had was having 'description on condition met' dialog thing that would come up if a 'grey condition' was enabled so that on mouse over, the user would 'know' why it was greyed out etc so I can display ("already installed" or "not compatible with <insert OS here>" etc

Another idea I had was to add the ability to execute '1 last thing' @ the end, before WPI closes, like a cleanup script option incase we need to take care of misc things (Right after installer.hta finishes).

On a sorta related topic:

I noticed that for the 'reboot feature' of WPI, you use the 'shutdown -f -r -t xx' command...why not a vb script that acts like a 'native reboot'

Below, I found from somewhere on the net and I use it in my own scripts and it is equivalent to 'Startmenu - > shutdown -> restart'

Function displayRebootConfirmation()

Ret=Msgbox ("Setup needs to restart in order to complete installation. Would you like to restart now?",VBYesNo,"Restart Now?")

If Ret=6 then
Set OpSysSet = GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery ("select * from Win32_OperatingSystem where Primary=true")

for each OpSys in OpSysSet
OpSys.Reboot()
next
end if

End Function

Just a couple of thoughts. Great work with this tool by the way, an absolute lifesaver!

Edited by JuMz

  • 3 weeks later...

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.