June 24th, 2004, 10:27 PM
Will this work in VB
Will this code work as a VBS logon script?
I will of course replace all the needed dir and paths.
Set objNet = CreateObject("Wscript.Network")
objNet.MapNetworkDrive "F:", "\\servername\drive"
Set wshObject = Wscript.CreateObject("Wscript.Shell")
desktopFolder = wshObject.SpecialFolders("Desktop")
set myShortcut = wshObject.CreateShortcut(desktopFolder & "\Notepad.lnk")
myShortcut.TargetPath = "%windir%\Notepad.exe"
end of script
Yeah thats right........I said It!
Ultimately everyone will have their own opinion--this is mine.
June 24th, 2004, 11:26 PM
I don't know any vb, but most programming languages I've used are case sensitive. I noticed that you had a few things that were different cases like "Set" and "set" and "Wscript" and "WSCript" (although I'm not sure if they were just two different variables. If they are, you should change the names to something more obvious so that people can tell them apart easier.
I could be wrong about all of that...could just be a vb thing, but thought I'd point it out anyway.