View Single Post
  #1 (permalink)  
Old October 4th, 2011, 06:07 PM
joeIT34 joeIT34 is offline
Registered User
 
Join Date: Sep 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Something went wrong and i am getting a error message. 800a03f3

There is my code i wrote :

Dim objfso, colDrivers, objDrive
Set objfso = CreateObject("Scripting.FileSystemObject")
Set colDrives = objfso.Drives
For Each objDrive In colDrives
If objDrive.IsReady = True Then
Set objfso.CopyFile "C:\lab5.vbs" , overwriting = true
End If
Next


Dim objWshShl, strTargetFolder, objDesktopShortcut, objProgramsShortcut
Dim strAppDataPath, objQuickLaunchShortcut, request, fso, path
inputbox(" Would you like a Desktop icon or a program shortcut?")
'Establish an instance of the WshShell object
Set objWshShl = WScript.CreateObject("WScript.Shell")

'Create the Desktop shortcut
strTargetFolder = objWshShl.SpecialFolders("Desktop")
Set objDesktopShortcut = objWshShl.CreateShortcut(strTargetFolder + _
"\\lab6.lnk")
objDesktopShortcut.TargetPath = "C:\lab.vbs"
objDesktopShortcut.Description = "lab 5 "
objDesktopShortcut.Hotkey = "CTRL+Alt+G"
objDesktopShortcut.IconLocation = "disk.ico"
objDesktopShortcut.Save

Do Until strOkToEnd = "yes"
'Create the Programs menu shortcut
strTargetFolder = objWshShl.SpecialFolders("Programs")
Set objProgramsShortcut = objWshShl.CreateShortcut(strTargetFolder & _
"\\lab5.lnk")
objProgramsShortcut.TargetPath = "c:\lab6.vbs"
objProgramsShortcut.Save
'this asks the user for a drive
Set fso = WScript.CreateObject("scripting.Filesystemobject")
request = InputBox("What drive would you Like?")
If request = "" Then
MsgBox "Sorry you didnt enter anything!",,"Error"
strOkToEnd = "no"
Elseif fso.driveexists(request) = False Then
MsgBox "the drive does Not exist!",,"Error"
strOkToEnd = "no"
Elseif request = "quit" Then
strOkToEnd = "yes"
'this asks the user for a path
Else
InputBox ("choose a path?")
Set path = request
If fso.DriveExists(request) = False Then
MsgBox "Your folder does not exists!",,"sorry"
Else
MsgBox "These are your Folders" & VbCrLf

End If
End If
Loop

Here is the error message i am getting:

line: 13
Char: 22
Error: expected '='
code: 800a03f3
can anyone help me fix it ?
Reply With Quote