How do I set the default theme or visual style

G

Guest

For our application we need to set some specific display settings, like
backgroud color, screen saver, fonts etc. All this stuff can be set by
applying a custom theme.

The problem occurs when you want this theme to be the default for all users.
I tried a lot but am not able to make it work. So of the stuff I tried:

1. Just replace the default "windows classic.theme" with my one. No result

2. Apply the registry setting
"Software\Microsoft\Windows\CurrentVersion\Policies\System!SetVisualStyle" in
both HKCU as HKLM. No result.

3. Call the following VBS script during FBA. Theme was applied before the
user was logged on. So failure once again.
=====================
Option Explicit
Dim oWShell, sTheme, Start

Set oWShell = CreateObject("WScript.Shell")
sTheme = Chr(34) + WScript.Arguments.Item(0) + Chr(34)

' Create Display Properties Window
Call oWShell.Run (sTheme)

' Activate Display Properties Window
Do
Call WScript.Sleep (500)
Loop Until oWShell.AppActivate ("Display Properties", False)

' Send ENTER to apply the theme
Call oWShell.SendKeys ("{ENTER}")
=====================


There must be a decent way to apply our custom display settings.
So if anyone has a clue on how , I'd like to read about it.

Thijs
 
K

KM

Honestly, I never dealt with user visual style themes to automate it on XPe.
I was wondering if you tried to set it up under [HKEY_USERS\.DEFAULT] branch?

Also, you can always apply new theme settings *after* user profile is created. Then you may need to do a extra reboot (or at least
logoff) though.
Always pretty easy to automate during FBA phase if you set up steps with Autologon involved. Autologon will help you creating all
required [spec'ed out] user accounts and to apply all the required settings for each account at run time with a set of batch files
(similar approach I have described and posted in this NG a [long] while ago so you may want to search NG archive).
 
G

Guest

Hi,

At the moment I'm trying to merge the theme with the "[HKEY_USERS\.DEFAULT]"
key.
This will change the default settings for all users.

As far as I know there logon only occurs after all FBA phases are completed.
So I tried to call the script in phase 12999 (the last phase) and build in
some delay. FBA is ran under the SYSTEM account, so I inserted this loop to
chec for the proper user before continuing to load the theme.
==========================
Do
Set oNetwork = CreateObject("WScript.Network")
sUser = oNetwork.UserName
Set oNetwork = Nothing
Call WScript.Sleep (2000)
Loop Until MsgBox("User " & sUser & " continue to load theme", vbYesNo) =
vbYes
==========================

The problem is that 'oNetwork.UserName' always returns 'SYSTEM'. I think the
wscipt engine takes a snapshot of the system when it starts. I tried to get
around this by creating a new 'WScript.Network' object every iteraration of
the loop. But 'oNetwork.UserName' keeps reporting 'SYSTEM'. I tested the
script by starting a seconds instance, while the first was still running and
reporting 'SYSTEM', which does report the user thats logged on. So it's not a
script problem, it's just the script engine that hates me.
Perhaps putting the loop code in a seperate file (CheckUser.vbs) and
calling it from the original.
=============================
Call oWShell.Run ("wscript.exe //i CheckUser.vbs")
=============================

Thijs
 
K

KM

I think you are overcomplicating the process a little bit.

FBA does run under Local system account so I am not sure what user name you expect to see if you launch another process (the script
you mentioned) from the FBA. You will certainly get the system account name.

This is the reason I mentioned Autologon. It gives you an ability to switch and load a user account (at least once but it will
create the user profile, reg.hive and user directories). Then with a set of self-cleaning batch files that are launched from the
user's start-up item folder (or from All-Users Startup folder) you can change any registry settings specific to the loaded user
account.

Another idea is to use a script launched from FBA at very late phase (as you did). The script should load a user hive and change
settings there directly (e.g., use reg.exe /LOAD command).
 
G

Guest

I already have autologon, so after FBA the user ncp_admin is logged on. The
script is started at phase 12999 of the FBA, without the FBA waiting for the
result. In the script I try to wait until after the automatic logon so that
it can apply my user specific settings.
The loop should report the 'SYSTEM' user when started, but after logon I
expected it to report 'ncp_admin' after which I would press 'Yes' to break
the loop and the script would apply the settings. The user interaction is
only there for test purposes, the final script should test for the proper
user and apply the settings.
The problem is as described: The value of 'oNetwork.UserName' doesn't change
from 'SYSTEM' to 'ncp_admin' after the logon. A new instance of the script,
started after the logon, the value of 'oNetwork.UserName' is 'ncp_admin' as
expected.
My conclusion is that the 'wscript.exe' takes some sort of snapshot when it
is started.

Currently, I have successfully applied the theme to default user registry
hive (HKEY_USERS\.DEFAULT) using this script:

======================================================================================
Sub cmiOnEndBuild(dwFlags)
Dim sKey

sKey = "HKEY_USERS\.DEFAULT\Control Panel\Colors"
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"", "mnmsrvc", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Active Title", "10 36 106", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ActiveBorder", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ActiveTitle", "0 0 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"AppWorkSpace", "128 128 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Background", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonAlternateFace", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonDkShadow", "0 0 0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonFace", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonHilight", "255 255 255", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonLight", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonShadow", "128 128 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ButtonText", "0 0 0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"GradientActiveTitle", "16 132 208", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"GradientInactiveTitle", "181 181 181", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"GrayText", "128 128 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Hilight", "0 0 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"HilightText", "255 255 255", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"HotTrackingColor", "0 0 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"InactiveBorder", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"InactiveTitle", "128 128 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"InactiveTitleText", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"InfoText", "0 0 0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"InfoWindow", "255 255 225", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MenuHilight", "0 0 128", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MenuBar", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MenuText", "0 0 0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Menu", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Scrollbar", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"TitleText", "255 255 255", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"WindowFrame", "0 0 0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Window", "255 255 255", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"WindowText", "0 0 0", cmiString

sKey = "HKEY_USERS\.DEFAULT\Control Panel\Desktop"
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"", "mnmsrvc", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"ActiveWndTrkTimeout", 0, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"AutoEndTasks", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"BlockSendInputResets", "", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"CaretWidth", 1, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CoolSwitch", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CoolSwitchColumns", "7", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CoolSwitchRows", "3", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CursorBlinkRate", "530", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"DragFullWindows", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"DragHeight", "4", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"DragWidth", "4", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"FontSmoothing", "2", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"FontSmoothingOrientation", 1, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"FontSmoothingType", 1, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"ForegroundFlashCount", 3, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"ForegroundLockTimeout", 200000, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"GridGranularity", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"HungAppTimeout", "5000", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"LowPowerActive", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"LowPowerTimeOut", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MenuShowDelay", "400", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"PaintDesktopVersion", 0, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Pattern", "(None)", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"PowerOffTimeOut", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"PowerOffActive", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ScreenSaveActive", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ScreenSaveTimeOut", "600", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"SCRNSAVE.EXE", "C:\Windows\system32\ssmarque.scr", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"TileWallpaper", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"UserPreferencesMask", Str2Arr("9e,3e,04,80"), cmiBinary
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"WaitToKillAppTimeout", "20000", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Wallpaper", "", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"WallpaperStyle", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"WheelScrollLines", "3", cmiString

sKey = "HKEY_USERS\.DEFAULT\Control Panel\Desktop\WindowMetrics"
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"", "mnmsrvc", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"AppliedDPI", 96, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_DWORD, sKey,
"BorderWidth", -15, cmiInteger
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"CaptionFont", Str2Arr( _
"f5,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00,00," & _

"00,00,00,01,00,00,00,00,41,00,72,00,69,00,61,00,6c,00,00,00,00,00,00,00,00,"
& _

"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,"
& _
"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"),
cmiBinary
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CaptionHeight", "-270", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CaptionWidth", "-270", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"IconFont", Str2Arr( _
"f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00," & _

"00,00,01,00,00,00,00,41,00,72,00,69,00,61,00,6c,00,00,00,00,00,00,00,60,37,"
& _

"0c,00,00,00,00,00,0b,00,00,00,00,00,00,00,4c,00,00,00,4b,00,00,00,4b,00,00,"
& _
"00,01,00,00,00,f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00"),
cmiBinary
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"IconSpacing" ,"-1125", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"IconTitleWrap", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"IconVerticalSpacing", "-1125", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"MenuFont", Str2Arr( _
"f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00,00," & _

"00,00,01,00,00,00,00,41,00,72,00,69,00,61,00,6c,00,00,00,00,00,00,00,00,00,"
& _

"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,"
& _
"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"),
cmiBinary
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MenuHeight", "-315", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MenuWidth", "-315", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"MessageFont", Str2Arr( _
"f0,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00," & _

"00,00,00,01,00,00,00,00,41,00,72,00,69,00,61,00,6c,00,00,00,00,00,00,00,00,"
& _

"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,"
& _
"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"),
cmiBinary
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"MinAnimate", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ScrollHeight", "-315", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"ScrollWidth", "-315", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Shell Icon Size", "32", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"SmCaptionFont", Str2Arr( _
"f3,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,bc,02,00," & _

"00,00,00,00,01,00,00,00,00,41,00,72,00,69,00,61,00,6c,00,00,00,00,00,00,00,"
& _

"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,"
& _

"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"),
cmiBinary
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"SmCaptionHeight", "-270", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"SmCaptionWidth", "-270", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_BINARY, sKey,
"StatusFont", Str2Arr( _
"f3,ff,ff,ff,00,00,00,00,00,00,00,00,00,00,00,00,90,01,00,00," & _

"00,00,00,01,00,00,00,00,41,00,72,00,69,00,61,00,6c,00,00,00,00,00,00,00,00,"
& _

"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,"
& _
"00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00"),
cmiBinary

sKey = "HKEY_USERS\.DEFAULT\Control Panel\Screen Saver.Marquee"
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Arial", "Arial Black", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Attributes", "00011", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"BackgroundColor", "192 192 192", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"CharSet", "0", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Mode", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Size", "72", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Speed", "1", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"Text", "Fico", cmiString
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"TextColor", "255 0 0", cmiString

sKey =
"HKEY_USERS\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Themes\LastTheme"
oPL.TargetRegEdit cRegOpWrite, cRegCondAlways, cmiREG_EXPAND_SZ, sKey,
"DisplayName of Modified", "NCP MMI (FBA)", cmiString

End Sub

Function Str2Arr(sHex)
Dim bArray(), nIdx, sLocal
sLocal = sHex
iIdx = 0
While (Len(sLocal) >= 2)
ReDim Preserve bArray(nIdx)
bArray(nIdx) = CByte("&h" + Left(sLocal, 2))
sLocal = Mid(sLocal, 4)
nIdx = nIdx + 1
Wend
Str2Arr = bArray
End Function

======================================================================================


Regards Thijs
 
K

KM

Setting up entries under [HKEY_USERS\.DEFAULT] was the way to go. No doubt.

As to the problem with getting user name from the script. If the script is launched from FBA it will be the SYSTEM, otherwise it
will be the name of the user the script process is launched under. (from within the FBA the script process inherits the user from
FBA process)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top