Arg81
Well-known member
Is this possible?
I have created a simple Windows App that on a push of a button needs to restart a print server.
However, the restart button on the print server web front end uses Javascript.
I have successfully got my app passing on the IP address as a variable for the print server, but I also need it to immediately run the Javascript, as this asks the user whether they want to restart (Yes / No).
I currently use;
At the point of opening Internet Explorer, I then want it to simulate pressing the "Restart" button on the webpage, which uses javascript:doRestart()
Any help would be much appriciated.
Kind Regards,
Luke
I have created a simple Windows App that on a push of a button needs to restart a print server.
However, the restart button on the print server web front end uses Javascript.
I have successfully got my app passing on the IP address as a variable for the print server, but I also need it to immediately run the Javascript, as this asks the user whether they want to restart (Yes / No).
I currently use;
VB.NET:
[SIZE=2][COLOR=#0000ff]Dim printip as string = lblIP.text
Dim[/COLOR][/SIZE][SIZE=2] writer [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] IO.StreamWriter("c:\RestartQueue.bat")
writer.WriteLine("Start IEXPLORE.EXE " & printip & "/a_server.shtm")
writer.Close()
Process.start("c:\RestartQueue.bat")
[/SIZE]
At the point of opening Internet Explorer, I then want it to simulate pressing the "Restart" button on the webpage, which uses javascript:doRestart()
Any help would be much appriciated.
Kind Regards,
Luke