I have a script that needs to be modified to create a folder on the desktop and share with everyone if it does not exist on a Windows 7 PC - No Domain. Here is the script, need help at bottom =======================================================
Set objShell = CreateObject("WScript.Shell")
objComputer=objShell.ExpandEnvironmentStrings("%ComputerName%")
IF Right(objComputer,3) = "000" Then
Else
strShortcut = objShell.SpecialFolders( "Desktop" ) & "\%username% Share.lnk"
strShortcut = objShell.ExpandEnvironmentStrings(strShortcut)
Set objLink = objShell.CreateShortcut( strShortcut )
objComputer=objShell.ExpandEnvironmentStrings("%ComputerName%")
objServer=Left(objComputer,7) & "-000"
objLink.Description = objShell.ExpandEnvironmentStrings("%username% Share")
objLink.TargetPath = objShell.ExpandEnvironmentStrings("\\" & objServer & "\Users\%username%\Desktop\%username% Share")
objLink.Save
End If
=======================================================
if "C:\Users\%username%\desktop\%username% Share" exits do nothing
if not create the folder and share it with everyone read only
The two if statements above is what I need to add, anyone have a clue how to make this work?