Actually, I figured this out:
In my previous script:
code:
$ProcStartInst.ShowWindow = 1
Is the line I couldn't get to work right.. well, according to Microsoft:
ShowWindow
Data type: uint16
Access type: Read/write
How the window is to be displayed to the user.
Value Meaning
1 SW_HIDE
2 SW_NORMAL
3 SW_SHOWMINIMIZED
4 SW_SHOWMAXIMIZED
5 SW_SHOWNOACTIVATE
6 SW_SHOW
7 SW_MINIMIZE
8 SW_SHOWMINNOACTIVE
9 SW_SHOWNA
10 SW_RESTORE
11 SW_SHOWDEFAULT
12 SW_FORCEMINIMIZE
.............
After playing with this, I learned the different modes work, but not the same way:
Value Meaning
0 SW_HIDE
1 SW_NORMAL
2 SW_SHOWMINIMIZED
3 SW_SHOWMAXIMIZED
4 SW_SHOWNOACTIVATE
5 SW_SHOW
6 SW_MINIMIZE
7 SW_SHOWMINNOACTIVE
8 SW_SHOWNA
9 SW_RESTORE
10 SW_SHOWDEFAULT
So, I can see some new and improved UDF's coming along..
Brian
{edit}
I'm still playing with the WinstationDesktop string. A blank string "" should set it to the currently logged on user... but not sure, yet.
[ 27 June 2002, 23:39: Message edited by: BrianTX ]