computerproblem
Gebruiker
- Lid geworden
- 14 aug 2007
- Berichten
- 21
Hallo allemaal,
Ik ben vorige week begonnen om een simpel programma te maken met Visual Basic 2008 Express Edition.
Nu wil ik het voor elkaar krijgen dat gebruikers het programma, Gedeelde Mappen, kunnen starten.
Dit programma is te vinden op onderstaande locatie:
C:\windows\system32\fsmgmt.msc
Maar het lukt mij niet om dit programma via VB te starten. De volgende code's heb ik al geprobeerd:
Alle andere programma's werken wel. Behalve fsmgmt.msc.
Kan iemand mij vertellen wat ik fout doe en hoe ik dit moet oplossen.
Mijn volledige van de button:
De foutmelding is de volgende:
FileNotFoundException was unhandled
Bestand niet gevonden
Groetjes,
Computerproblem
Ik ben vorige week begonnen om een simpel programma te maken met Visual Basic 2008 Express Edition.
Nu wil ik het voor elkaar krijgen dat gebruikers het programma, Gedeelde Mappen, kunnen starten.
Dit programma is te vinden op onderstaande locatie:
C:\windows\system32\fsmgmt.msc
Maar het lukt mij niet om dit programma via VB te starten. De volgende code's heb ik al geprobeerd:
Code:
Shell("C:\windows\system32\fsmgmt.msc")
Code:
Shell("fsmgmt")
Code:
Shell("fsmgmt.msc")
Code:
Shell("system32\fsmgmt.msc")
Code:
Shell"(system32\fsmgmt.msc")
Alle andere programma's werken wel. Behalve fsmgmt.msc.
Kan iemand mij vertellen wat ik fout doe en hoe ik dit moet oplossen.
Mijn volledige van de button:
Code:
Private Sub fsmgmt_button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fsmgmt_button.Click
Shell("fsmgmt.msc")
End Sub
De foutmelding is de volgende:
FileNotFoundException was unhandled
Bestand niet gevonden
System.IO.FileNotFoundException was unhandled
Message="Bestand niet gevonden."
Source="Microsoft.VisualBasic"
StackTrace:
bij Microsoft.VisualBasic.Interaction.Shell(String PathName, AppWinStyle Style, Boolean Wait, Int32 Timeout)
bij Windows_Tools.Verborgen_Windows_Tools.fsmgmt_button_Click(Object sender, EventArgs e) in C:\Documents and Settings\Joey\Mijn documenten\Visual Studio 2008\Projects\WindowsApplication1\WindowsApplication1\Form1.vb:regel 16
bij System.Windows.Forms.Control.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnClick(EventArgs e)
bij System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bij System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bij System.Windows.Forms.Control.WndProc(Message& m)
bij System.Windows.Forms.ButtonBase.WndProc(Message& m)
bij System.Windows.Forms.Button.WndProc(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bij System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bij System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bij System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bij System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bij System.Windows.Forms.Application.Run(ApplicationContext context)
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bij Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bij Windows_Tools.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:regel 81
bij System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
bij System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
bij System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
bij System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
bij System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
bij System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
bij System.Activator.CreateInstance(ActivationContext activationContext)
bij Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
bij System.Threading.ThreadHelper.ThreadStart_Context(Object state)
bij System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
bij System.Threading.ThreadHelper.ThreadStart()
InnerException:
Groetjes,
Computerproblem