472,983 Members | 2,076 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,983 software developers and data experts.

Shutdown/Restart Windows XP Pro using VB .NET program

I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0
was able to shut down or restart the (windows XP) machine using a series of
API calls. (Getlasterror, GetCurrentProcess, OpenProcessToken,
LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx.

I am trying to avoid using any API calls if possible and to use managed code
instead. I couldn't find any easy way of doing this but searching the
Internet with Google I found the following code for C:

using System;
using System.Management;
using System.Runtime.InteropServices;
// Shutdown a system using WMI (management classes)
public class Wmis {
public static void Main() {
ManagementObject o;
ManagementPath path = new ManagementPath( );
path.Server = "xxxxxx"; // your server name here
path.NamespacePath = @"root\CIMV2";
// check your boot.ini file for the correct operating system entry & boot
partition
path.RelativePath = @"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINNT|\\Device\\Harddisk0\\Partit ion1""";
o = new ManagementObject(path);
ManagementBaseObject inParams = null;
bool EnablePrivileges = o.Scope.Options.EnablePrivileges; // set required
privileges
o.Scope.Options.EnablePrivileges = true;
// Invoke method (shutdown or reboot)
ManagementBaseObject outParams = o.InvokeMethod("Shutdown", inParams, null);
<====================
o.Scope.Options.EnablePrivileges = EnablePrivileges; // restore privs
(optional)

I don't know C at all but I tried nevertheless to convert it to VB .NET 2002
as follows:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim o As New ManagementObject()
Dim BWManagementPath As New ManagementPath()
Dim inParams As System.Management.ManagementBaseObject()
Dim OptParams As InvokeMethodOptions
Dim OutParams As ManagementBaseObject()
Dim enableprivileges As Boolean
BWManagementPath.Server = "DESKTOP"
BWManagementPath.NamespacePath = "root\CIMV2"
BWManagementPath.RelativePath =
"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINDOWS|\\Device\\Harddisk0\\Part ition1"""
o = New ManagementObject(BWManagementPath)
EnablePrivileges = o.Scope.Options.EnablePrivileges
o.Scope.Options.EnablePrivileges = True
OutParams = o.InvokeMethod("Shutdown", inParams)
<==========================
o.Scope.Options.EnablePrivileges = enableprivileges ' restore privs
(optional)
End Sub

When I tried to convert the outParams=o.InvokeMethod line, I couldn't find a
way of specifying "Null" without the compiler objecting with the following
message:

"\Shutdown Test\Form1.vb(73): Overload resolution failed because no
accessible 'InvokeMethod' can be called with these arguments:
'Public Overloads Function InvokeMethod(methodName As String,
inParameters As System.Management.ManagementBaseObject, options As
System.Management.InvokeMethodOptions) As
System.Management.ManagementBaseObject': Value of type '1-dimensional array
of System.Management.ManagementBaseObject' cannot be converted to
'System.Management.ManagementBaseObject'.
'Public Overloads Function InvokeMethod(methodName As String,
inParameters As System.Management.ManagementBaseObject, options As
System.Management.InvokeMethodOptions) As
System.Management.ManagementBaseObject': Value of type 'String' cannot be
converted to 'System.Management.InvokeMethodOptions'.
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()
As Object)': Value of type 'String' cannot be converted to
'System.Management.ManagementOperationObserver'.
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()
As Object)': Value of type '1-dimensional array of
System.Management.ManagementBaseObject' cannot be converted to 'String'.
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()
As Object)': Value of type 'String' cannot be converted to '1-dimensional
array of System.Object'."

So I left the "null" bit off and ran the program.
When I do this, the outparams=o.InvokeMethod line fails with
"Privilege Not Held"

Any help would be greatefully received.

Nov 20 '05 #1
2 11334
Thanks very much for your help. Where could I find information about the
InvokeMethod("Shutdown") as I assume I could pass different parameters and
get it to do a restart instead??

Thanks and regards,

Brian.
"Michal Sampson [MSFT]" <mi******@online.microsoft.com> wrote in message
news:h0**************@cpmsftngxa06.phx.gbl...
Hi Brian,
I made a couple tweaks to your code and ran a test and sure enough, I
shutdown one of my desktops from another computer. Here's the code that I
ran:

Dim o As ManagementObject
Dim BWManagementPath As New ManagementPath
Dim inParams As System.Management.ManagementBaseObject
Dim OptParams As InvokeMethodOptions
Dim OutParams As ManagementBaseObject
Dim enableprivileges As Boolean
BWManagementPath.Server = "MY COMPUTER NAME"
BWManagementPath.NamespacePath = "root\CIMV2"
BWManagementPath.RelativePath =
"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINDOWS|\\Device\\Harddisk0\\Part ition1"""
o = New ManagementObject(BWManagementPath)
enableprivileges = o.Scope.Options.EnablePrivileges
o.Scope.Options.EnablePrivileges = True
OutParams = o.InvokeMethod("Shutdown", inParams, Nothing)
o.Scope.Options.EnablePrivileges = enableprivileges ' restore privs (optional)

Here are the differences:
- The null keyword in C# is the equivalent of Nothing in VB .Net so on the
InvokeMethod call I passed Nothing where the null parameter was.
- You had some of the types above marked with an empty pair of parentheses: Dim BWManagementPath As New ManagementPath()
Dim inParams As System.Management.ManagementBaseObject()
This creates those variables as arrays and I could not compile until I
removed those parens.
- You may not have security permissions to shutdown the remote machine.
Make sure you have administrator rights on the machine that you wish to
shutdown.

Good luck!

--
Mike Sampson, VB .Net Developer in Deployment
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "Brian Worth" <Noname@Nowhere>
Subject: Shutdown/Restart Windows XP Pro using VB .NET program
Date: Mon, 6 Oct 2003 18:48:50 +0100
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uc**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: ppp-0-16.milt-a-2.access.uk.tiscali.com 80.40.51.16
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:144270
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB 4.0was able to shut down or restart the (windows XP) machine using a series ofAPI calls. (Getlasterror, GetCurrentProcess, OpenProcessToken,
LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx.

I am trying to avoid using any API calls if possible and to use managed code
instead. I couldn't find any easy way of doing this but searching the
Internet with Google I found the following code for C:

using System;
using System.Management;
using System.Runtime.InteropServices;
// Shutdown a system using WMI (management classes)
public class Wmis {
public static void Main() {
ManagementObject o;
ManagementPath path = new ManagementPath( );
path.Server = "xxxxxx"; // your server name here
path.NamespacePath = @"root\CIMV2";
// check your boot.ini file for the correct operating system entry & boot
partition
path.RelativePath = @"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINNT|\\Device\\Harddisk0\\Parti tion1""";
o = new ManagementObject(path);
ManagementBaseObject inParams = null;
bool EnablePrivileges = o.Scope.Options.EnablePrivileges; // set required
privileges
o.Scope.Options.EnablePrivileges = true;
// Invoke method (shutdown or reboot)
ManagementBaseObject outParams = o.InvokeMethod("Shutdown", inParams,

null);
<====================
o.Scope.Options.EnablePrivileges = EnablePrivileges; // restore privs
(optional)

I don't know C at all but I tried nevertheless to convert it to VB .NET

2002
as follows:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim o As New ManagementObject()
Dim BWManagementPath As New ManagementPath()
Dim inParams As System.Management.ManagementBaseObject()
Dim OptParams As InvokeMethodOptions
Dim OutParams As ManagementBaseObject()
Dim enableprivileges As Boolean
BWManagementPath.Server = "DESKTOP"
BWManagementPath.NamespacePath = "root\CIMV2"
BWManagementPath.RelativePath =
"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINDOWS|\\Device\\Harddisk0\\Par tition1"""
o = New ManagementObject(BWManagementPath)
EnablePrivileges = o.Scope.Options.EnablePrivileges
o.Scope.Options.EnablePrivileges = True
OutParams = o.InvokeMethod("Shutdown", inParams)
<==========================
o.Scope.Options.EnablePrivileges = enableprivileges ' restore privs(optional)
End Sub

When I tried to convert the outParams=o.InvokeMethod line, I couldn't find a
way of specifying "Null" without the compiler objecting with the

followingmessage:

"\Shutdown Test\Form1.vb(73): Overload resolution failed because no
accessible 'InvokeMethod' can be called with these arguments:
'Public Overloads Function InvokeMethod(methodName As String,
inParameters As System.Management.ManagementBaseObject, options As
System.Management.InvokeMethodOptions) As
System.Management.ManagementBaseObject': Value of type '1-dimensional arrayof System.Management.ManagementBaseObject' cannot be converted to
'System.Management.ManagementBaseObject'.
'Public Overloads Function InvokeMethod(methodName As String,
inParameters As System.Management.ManagementBaseObject, options As
System.Management.InvokeMethodOptions) As
System.Management.ManagementBaseObject': Value of type 'String' cannot be
converted to 'System.Management.InvokeMethodOptions'.
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()As Object)': Value of type 'String' cannot be converted to
'System.Management.ManagementOperationObserver' .
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()As Object)': Value of type '1-dimensional array of
System.Management.ManagementBaseObject' cannot be converted to 'String'.
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()As Object)': Value of type 'String' cannot be converted to '1-dimensional
array of System.Object'."

So I left the "null" bit off and ran the program.
When I do this, the outparams=o.InvokeMethod line fails with
"Privilege Not Held"

Any help would be greatefully received.

Nov 20 '05 #2
Hi. I tried the amended code but I still get System Management Exception:
Privilege Not Held from the o.InvokeMethod line.

I ran it under my Administrator signon as well and still got the same. I
tried from both the Visual Studio environment and also running the .EXE.

The code I used was:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim o As ManagementObject
Dim BWManagementPath As New ManagementPath()
Dim inParams As System.Management.ManagementBaseObject
Dim OptParams As InvokeMethodOptions
Dim OutParams As ManagementBaseObject
Dim enableprivileges As Boolean
BWManagementPath.Server = "PRECISION340TST"
BWManagementPath.NamespacePath = "root\CIMV2"
BWManagementPath.RelativePath =
"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINDOWS|\\Device\\Harddisk0\\Part ition1"""
o = New ManagementObject(BWManagementPath)
enableprivileges = o.Scope.Options.EnablePrivileges
o.Scope.Options.EnablePrivileges = True
OutParams = o.InvokeMethod("Shutdown", inParams, Nothing)
o.Scope.Options.EnablePrivileges = enableprivileges ' restore privs
(optional)
End Sub

I just built a simple form with a button called Button1 which I click to
invoke the code above.

Any ideas what may be wrong? - I replaced my code with yours totally -
except I altered BWManagementPath.Server to reflect the system name I was
trying to close down. I am trying to shut down the machine the program is
running on.

Thanks and regards,

Brian.
"Brian Worth" <Noname@Nowhere> wrote in message
news:em**************@TK2MSFTNGP09.phx.gbl...
Thanks very much for your help. Where could I find information about the
InvokeMethod("Shutdown") as I assume I could pass different parameters and
get it to do a restart instead??

Thanks and regards,

Brian.
"Michal Sampson [MSFT]" <mi******@online.microsoft.com> wrote in message
news:h0**************@cpmsftngxa06.phx.gbl...
Hi Brian,
I made a couple tweaks to your code and ran a test and sure enough, I
shutdown one of my desktops from another computer. Here's the code that I
ran:

Dim o As ManagementObject
Dim BWManagementPath As New ManagementPath
Dim inParams As System.Management.ManagementBaseObject
Dim OptParams As InvokeMethodOptions
Dim OutParams As ManagementBaseObject
Dim enableprivileges As Boolean
BWManagementPath.Server = "MY COMPUTER NAME"
BWManagementPath.NamespacePath = "root\CIMV2"
BWManagementPath.RelativePath =
"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINDOWS|\\Device\\Harddisk0\\Part ition1"""
o = New ManagementObject(BWManagementPath)
enableprivileges = o.Scope.Options.EnablePrivileges
o.Scope.Options.EnablePrivileges = True
OutParams = o.InvokeMethod("Shutdown", inParams, Nothing)
o.Scope.Options.EnablePrivileges = enableprivileges ' restore privs
(optional)

Here are the differences:
- The null keyword in C# is the equivalent of Nothing in VB .Net so on the InvokeMethod call I passed Nothing where the null parameter was.
- You had some of the types above marked with an empty pair of

parentheses:
Dim BWManagementPath As New ManagementPath()
Dim inParams As System.Management.ManagementBaseObject()
This creates those variables as arrays and I could not compile until I removed those parens.
- You may not have security permissions to shutdown the remote machine.
Make sure you have administrator rights on the machine that you wish to
shutdown.

Good luck!

--
Mike Sampson, VB .Net Developer in Deployment
This posting is provided "AS IS" with no warranties, and confers no

rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

Note: For the benefit of the community-at-large, all responses to this
message are best directed to the newsgroup/thread from which they
originated.
--------------------
From: "Brian Worth" <Noname@Nowhere>
Subject: Shutdown/Restart Windows XP Pro using VB .NET program
Date: Mon, 6 Oct 2003 18:48:50 +0100
Lines: 97
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
Message-ID: <uc**************@TK2MSFTNGP10.phx.gbl>
Newsgroups: microsoft.public.dotnet.languages.vb
NNTP-Posting-Host: ppp-0-16.milt-a-2.access.uk.tiscali.com 80.40.51.16
Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:144270
X-Tomcat-NG: microsoft.public.dotnet.languages.vb

I have just upgraded from VB 4.0 to VB .NET 2002. One program under VB

4.0was able to shut down or restart the (windows XP) machine using a series of
API calls. (Getlasterror, GetCurrentProcess, OpenProcessToken,
LookupPrivilegeValue, AdjustTokenPrivilegese, ExitWindowsEx.

I am trying to avoid using any API calls if possible and to use managed

code
instead. I couldn't find any easy way of doing this but searching the
Internet with Google I found the following code for C:

using System;
using System.Management;
using System.Runtime.InteropServices;
// Shutdown a system using WMI (management classes)
public class Wmis {
public static void Main() {
ManagementObject o;
ManagementPath path = new ManagementPath( );
path.Server = "xxxxxx"; // your server name here
path.NamespacePath = @"root\CIMV2";
// check your boot.ini file for the correct operating system entry &
bootpartition
path.RelativePath = @"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINNT|\\Device\\Harddisk0\\Parti tion1""";
o = new ManagementObject(path);
ManagementBaseObject inParams = null;
bool EnablePrivileges = o.Scope.Options.EnablePrivileges; // set requiredprivileges
o.Scope.Options.EnablePrivileges = true;
// Invoke method (shutdown or reboot)
ManagementBaseObject outParams = o.InvokeMethod("Shutdown", inParams,

null);
<====================
o.Scope.Options.EnablePrivileges = EnablePrivileges; // restore privs
(optional)

I don't know C at all but I tried nevertheless to convert it to VB .NET

2002
as follows:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim o As New ManagementObject()
Dim BWManagementPath As New ManagementPath()
Dim inParams As System.Management.ManagementBaseObject()
Dim OptParams As InvokeMethodOptions
Dim OutParams As ManagementBaseObject()
Dim enableprivileges As Boolean
BWManagementPath.Server = "DESKTOP"
BWManagementPath.NamespacePath = "root\CIMV2"
BWManagementPath.RelativePath =
"Win32_OperatingSystem.Name=""Microsoft Windows XP
Professional|C:\\WINDOWS|\\Device\\Harddisk0\\Par tition1"""
o = New ManagementObject(BWManagementPath)
EnablePrivileges = o.Scope.Options.EnablePrivileges
o.Scope.Options.EnablePrivileges = True
OutParams = o.InvokeMethod("Shutdown", inParams)
<==========================
o.Scope.Options.EnablePrivileges = enableprivileges ' restore

privs(optional)
End Sub

When I tried to convert the outParams=o.InvokeMethod line, I couldn't find
a
way of specifying "Null" without the compiler objecting with the

followingmessage:

"\Shutdown Test\Form1.vb(73): Overload resolution failed because no
accessible 'InvokeMethod' can be called with these arguments:
'Public Overloads Function InvokeMethod(methodName As String,
inParameters As System.Management.ManagementBaseObject, options As
System.Management.InvokeMethodOptions) As
System.Management.ManagementBaseObject': Value of type '1-dimensional arrayof System.Management.ManagementBaseObject' cannot be converted to
'System.Management.ManagementBaseObject'.
'Public Overloads Function InvokeMethod(methodName As String,
inParameters As System.Management.ManagementBaseObject, options As
System.Management.InvokeMethodOptions) As
System.Management.ManagementBaseObject': Value of type 'String' cannot beconverted to 'System.Management.InvokeMethodOptions'.
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()As Object)': Value of type 'String' cannot be converted to
'System.Management.ManagementOperationObserver' .
'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()As Object)': Value of type '1-dimensional array of
System.Management.ManagementBaseObject' cannot be converted to 'String'. 'Public Overloads Sub InvokeMethod(watcher As
System.Management.ManagementOperationObserver, methodName As String, args()As Object)': Value of type 'String' cannot be converted to '1-dimensionalarray of System.Object'."

So I left the "null" bit off and ran the program.
When I do this, the outparams=o.InvokeMethod line fails with
"Privilege Not Held"

Any help would be greatefully received.


Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Senthil | last post by:
Hi, I would like to know the code for reboot and shutdown windows xp professional using VB.Net. thanx Senthil
4
by: Mohammed Abdel-Razzak | last post by:
Dear sirs I want to know how can I shutdown or restart my computer using C# Also I want to know how can I open any windows program using C# (EX: opening the windows calculator from my...
6
by: carbon_dragon | last post by:
Ok, so here is the problem. I'm working on a headless server program implemented as a .NET C# Console project. There is a UPS mounted to this server (though not a windows compliant UPS). I can only...
3
by: Chris Knievel | last post by:
Hi, i am trying to save some data in a excel spreadsheet, whenever the programm shuts down. Mostly this happens when a user is logging off or shuts the computer down. im am using the Private Sub...
2
by: Sin Jeong-hun | last post by:
I created a windows form application. It has a Threading.Timer and when the timer ticks it does some work and show a popup window. The problem is that while this program is running if the user...
5
by: Phil Tusa | last post by:
Greetings to all .... I have a need to issue a shutdown and/or Restart Windows XP inside my application. Any help or example code would be appreciated! -- Phil
1
by: CyberSoftHari | last post by:
I want to get applications running (Showing) in Task bar (and show those applications running) and Cancel windows LogOff, Shutdown, Restart when user try to Click windows LogOff, Shutdown, Restart
1
by: chandru | last post by:
hai friends, Iam developing a application using .NET remoting ,in which it shuts down,logs off , restart , locks remote PC.i tried to use windows ExwindowsEXAPI for shutdown,logoff , restart ...
3
by: IdleBrain | last post by:
Gurus, I am trying to delay Windows Shutdown/Restart to perfrom cleanup and I am using the following code: protected override void WndProc(ref Message ex)
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: Aliciasmith | last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
4
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.