▽1
●
oil999 ●200ポイント ベストアンサー |
Windowsのコンピュータ名の取得を意図しているなら、VBScriptで下記のように記述します。ブラウザはIE限定です。
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> </head> <body> <script language="VBScript"> <!-- Function getComputerName() Set objNetWork = CreateObject("WScript.Network") getComputerName = objNetWork.ComputerName Set objNetWork = Nothing End Function MsgBox getComputerName() --> </script> </body> </html>
サーバのフォルダをpath0、ファイル名をfname、クライアントのフォルダをpath1とします。
Function copyFile(path0, fname, path1) Set objWS = CreateObject("WScript.Shell"); cmd = "copy " & path0 & fname & " " & path1 objWS.run(cmd); End Function
以下のようにします。
Function runExcel(path1, fname) With CreateObject("Excel.Application") .Visible = True .Workbooks.Open (path1 & fname) End With End Function