Need some help with this script. It is supposed to install a copy of the frdb.mdb,
which is a shell, to all users folder and then place a shortcut on the desktop.
For some reason the .mdb is not copying to the All Users folder. Thanks.
Dim MyPath
Dim oNet
Set oNet = WScript.CreateObject("WScript.Network")
MyFile = "\\MyServer\Dept\Dept Database\FRDB.mdb"
'DestFile = "c:\docume~1\" & oNet.userName & "\desktop\*.*"
DestFile = "c:\docume~1\alluse~1\FRDB.mdb"
MyBatCode = "cmd.exe /c copy " & MyFile & " " & DestFile
Set objShell = CreateObject("WScript.Shell")
objshell.run(mybatcode)
Set oWS = WScript.CreateObject("WScript.Shell")
sLinkFile = "c:\docume~1\alluse~1\desktop\Reporting Database.LNK"
Set oLink = oWS.CreateShortcut(sLinkFile)
oLink.Targetpath = "c:\docume~1\alluse~1\FRDB.mdb"
oLink.Description = "Reporting Database"
oLink.IconLocation = "\\MyServer\Dept\Dept Database\FRDB\analyzer.ico"
oLink.Save
msgbox "Please verify that the shortcut 'Reporting Database' is on your PC
Desktop",,"Verify
which is a shell, to all users folder and then place a shortcut on the desktop.
For some reason the .mdb is not copying to the All Users folder. Thanks.
Dim MyPath
Dim oNet
Set oNet = WScript.CreateObject("WScript.Network")
MyFile = "\\MyServer\Dept\Dept Database\FRDB.mdb"
'DestFile = "c:\docume~1\" & oNet.userName & "\desktop\*.*"
DestFile = "c:\docume~1\alluse~1\FRDB.mdb"
MyBatCode = "cmd.exe /c copy " & MyFile & " " & DestFile
Set objShell = CreateObject("WScript.Shell")
objshell.run(mybatcode)
Set oWS = WScript.CreateObject("WScript.Shell")
sLinkFile = "c:\docume~1\alluse~1\desktop\Reporting Database.LNK"
Set oLink = oWS.CreateShortcut(sLinkFile)
oLink.Targetpath = "c:\docume~1\alluse~1\FRDB.mdb"
oLink.Description = "Reporting Database"
oLink.IconLocation = "\\MyServer\Dept\Dept Database\FRDB\analyzer.ico"
oLink.Save
msgbox "Please verify that the shortcut 'Reporting Database' is on your PC
Desktop",,"Verify