I can't get this thing to create this hidden folder for the life of me. It completes without any errors just can't get it to create the folder.
import os
import ctypes
import subprocess
import urllib
from subprocess import Popen, PIPE, STDOUT
def check_prep (path, stdout, mkdir):
path = "C:\Sysprep\sys_prep"
stdout = os.path.exists(path)
mkdir = os.makedirs(path)
if stdout == "False":
FILE_ATTRIBUTE_HIDDEN = 0x02
mkdir
ret = ctypes.windll.kernel32.SetFileAttributesW(mkdir, FILE_ATTRIBUTE_HIDDEN)