Hi
I'm installing a vb program on windows 7 and coming up with an error regarding WSHOM.ocx
It seems this control will not register in 7.
My code uses the FileSystem commands, is there an alternative so i can use the application:
Private Sub Form_Load()
On Error GoTo errHandler
Dim fso As New FileSystemObject
Dim LocFile As String
Dim SerFile As String
LocFile = "C:\Program Files\Estimator Console\Estimator Console.exe"
SerFile = "L:\MMPDF\EC-Update\Estimator Console.exe"
If fso.FileExists("C:\Program Files\Estimator Console\Estimator Console.exe") Then
fso.DeleteFile LocFile
fso.CopyFile SerFile, LocFile
Else
fso.CopyFile SerFile, LocFile
End If
Set fso = Nothing
Shell LocFile, vbNormalFocus
Unload Me
errHandler:
Select Case Err
Case 53
MsgBox "There has been an error launching " & vbCrLf & _
"the Estimator Console " & vbCrLf & _
"please contact Dave Willett for " & vbCrLf & _
"further instructions", vbExclamation, "Launch Error"
Unload Me
Case 70
MsgBox "The Estimator Console Is " & vbCrLf & _
"already running", vbInformation, "Error"
Unload Me
End Select
End Sub
WSHOM
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: WSHOM
Hi Rory
Just got chance to look at the Microsoft Scripting Runtime. I'm already using this in my code:
Dim fso As New FileSystemObject
Perhaps I've missed something or you could enlighten me if there are different versions which just use the sccrun without the wshom ?
Just got chance to look at the Microsoft Scripting Runtime. I'm already using this in my code:
Dim fso As New FileSystemObject
Perhaps I've missed something or you could enlighten me if there are different versions which just use the sccrun without the wshom ?
Cheers ...
Dave.
Dave.
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: WSHOM
Hmm
I've checked and debugged the process and it seems I get an error 70 permissions.
The code as above just basically copies the server file to the local destination, maybe it wasn't wshom after all.
Obviously Windows 7 permissions need to be set up differently to enable the process to function correctly.
If anyone knows or has seen this before please let me know, other than that I'll need to google for a solution or instructions to get around the permissions.
Regards
I've checked and debugged the process and it seems I get an error 70 permissions.
The code as above just basically copies the server file to the local destination, maybe it wasn't wshom after all.
Obviously Windows 7 permissions need to be set up differently to enable the process to function correctly.
If anyone knows or has seen this before please let me know, other than that I'll need to google for a solution or instructions to get around the permissions.
Regards
Cheers ...
Dave.
Dave.
-
- SilverLounger
- Posts: 1728
- Joined: 25 Jan 2010, 08:34
- Location: Stoke on Trent - Staffordshire - England
Re: WSHOM
Thanks Rory
It seems the UAC settings has sorted the issue out.
I'm not too familiar with Windows 7 settings, but you learn a little every day.
Thanks again..
It seems the UAC settings has sorted the issue out.
I'm not too familiar with Windows 7 settings, but you learn a little every day.
Thanks again..
Cheers ...
Dave.
Dave.