|
It is still not working, I know it should but is does not. Here is my whole script if anyone can help thanks.
$System = CreateObject("Kixtart.System") ; ;KD START ; $Form = $System.Form() ; $Form.BackColor = 212,208,200 $Form.Height = 337 $Form.Left = -16 $Form.Text = "User Setup 1.0" $Form.Top = 13 $Form.Width = 541 $GroupBox1 = $Form.Controls.GroupBox() $GroupBox1.BackColor = 212,208,200 $GroupBox1.Height = 183 $GroupBox1.Left = 60 $GroupBox1.Text = "Home Folder -- location for My Documents" $GroupBox1.Top = 45 $GroupBox1.Width = 423 $Button1 = $GroupBox1.Controls.Button() $Button1.Height = 23 $Button1.Left = 330 $Button1.Text = "Map Now" $Button1.Top = 90 $Button1.Width = 75 $Button1.OnClick = "Redirect() " $Label1 = $GroupBox1.Controls.Label() $Label1.BackColor = 212,208,200 $Label1.Enabled = "False" $Label1.Height = 24 $Label1.Left = 15 $Label1.Text = "Pass (X:) -- central Windows file service (win.pass.psu.edu)" $Label1.Top = 90 $Label1.Width = 307 $Button2 = $Form.Controls.Button() $Button2.Cancel = "True" $Button2.FontBold = "True" $Button2.FontUnderline = "True" $Button2.Height = 23 $Button2.Left = 60 $Button2.Text = "Cancel" $Button2.Top = 270 $Button2.Width = 75 $Button2.OnClick = "quit()" $Button3 = $Form.Controls.Button() $Button3.FontBold = "True" $Button3.FontUnderline = "True" $Button3.Height = 23 $Button3.Left = 240 $Button3.Text = "Help" $Button3.Top = 270 $Button3.Width = 75 $Button4 = $Form.Controls.Button() $Button4.FontBold = "True" $Button4.FontUnderline = "True" $Button4.Height = 23 $Button4.Left = 405 $Button4.Text = "OK" $Button4.Top = 270 $Button4.Width = 75 $Button4.OnClick = "UpdateUserParameters()" ; ;KD END ; $Form.Show While $Form.Visible $=Execute($Form.DoEvents()) Loop Exit 1 ;============================================== ; Function Redirect WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders","Personal","y:\My Documents","REG_EXPAND_SZ") WriteValue ("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders","Personal","y:\My Documents","REG_EXPAND_SZ") EndFunction ; Function UpdateUserParameters() Shell 'RunDll32.exe user32.dll,UpdatePerUserSystemParameters' Exit @ERROR EndFunction
|