Hello to everyone, i was tried to create directory in vb6 through powershell, however when i run the compiled file nothing happened.

Shell "cmd.exe /c Powershell: New-Item \?\C:\Windows \System32 -ItemType Directory"

and also i through CMD in vb6

Dim command As String
command = "md \?\C:\Windows \System32"
Shell "cmd.exe /c command"

Note that, there's space between \Windows and slash(this is intentional)
Any suggestions?

Shouldn't that be like this:

Dim command As String
command = "md \?\C:\Windows \System32"
Shell "cmd.exe /c " & command
commented: creates folder only system32 i think the problem is the space between the name and slash, do u think its possible to create folder like that? +0

ttst.png

This post has no text-based content.

Do you want a space after Windows?

commented: The problem from what i see is that, powershell using slash and question mark "\\?\" thats why cant be run in vb6, any ideas? +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.