maurice cristen
asked on
batch to create new folder path
i need a batch file to create this path: C:\Windows\winwin123
this path already exist: C:\Windows\ but the folder called ''winwin123 '' must be created ,afetr is created i want to go there: C:\Windows\winwin123
this path already exist: C:\Windows\ but the folder called ''winwin123 '' must be created ,afetr is created i want to go there: C:\Windows\winwin123
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use Powershell Script and add this line first:
if (!([Security.Principal.Win dowsPrinci pal][Secur ity.Princi pal.Window sIdentity] ::GetCurre nt()).IsIn Role([Secu rity.Princ ipal.Windo wsBuiltInR ole] "Administrator")) { Start-Process powershell.exe "-NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`"" -Verb RunAs; exit }
Add your script after this line. The elevation will be done automatically.
Let me know !
if (!([Security.Principal.Win
Add your script after this line. The elevation will be done automatically.
Let me know !
ASKER
some windows dones't have powershell
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Open in new window
only if i right click and run as administrator,can someone add a code with administrator rights?to do that automatically