ericsmith1172
Programmer
Basically I am running an Intranet (not Internet) based Web Page (same scripting anyway). What I am trying to accomplish is that when the company opens our Intranet page the time and date are synchronized to our server. Our normal command is:
'net time \\[Server Name] /set /y'
(Which is also sent up as a batch file. "Clock_Sync.Bat"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
How do I get this command and/or batch file to run when a Web Page is opened? (I don't want for the employees to have the option to download the batch file, I just want it to run and sync the clocks.)
What is the script I need?
I started with:
<script>
wshl = new ActiveXObject("WScript.Shell"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
wshl.run("start e:\\[Folder Name]\Clock_Sync.Bat"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
</script>
This works locally but not over a network. It will open the window (doesn't process the batch file or command) then closes. The open and close affect I wanted, it's just not running the batch file.
'net time \\[Server Name] /set /y'
(Which is also sent up as a batch file. "Clock_Sync.Bat"
How do I get this command and/or batch file to run when a Web Page is opened? (I don't want for the employees to have the option to download the batch file, I just want it to run and sync the clocks.)
What is the script I need?
I started with:
<script>
wshl = new ActiveXObject("WScript.Shell"
wshl.run("start e:\\[Folder Name]\Clock_Sync.Bat"
</script>
This works locally but not over a network. It will open the window (doesn't process the batch file or command) then closes. The open and close affect I wanted, it's just not running the batch file.