(imported topic written by johnism91)
so my fixlet is workign but this dos window apears for som reason… and will not close untill the user close it and then the fixlet shows competed?
Thanks for any help or incite ,
john
PS. here is the code
download http://BLAH:52311/Uploads/18445f0f77cc6be268e01a2a373c9c62797124bd/RighFaxPrinter.tmp
continue if {(size of it = 811311 AND sha1 of it = “18445f0f77cc6be268e01a2a373c9c62797124bd”) of file “RighFaxPrinter.tmp” of folder “__Download”}
extract RighFaxPrinter.tmp
createfile until EndScript
on error resume next
failed = false
set fso = createobject(“scripting.filesystemobject”)
makefolder “C:\Program Files\Assurant”
makefolder “C:\Program Files\Assurant\RightFaxPrinter”
makefolder “C:\RighFaxPrinter”
fso.deletefile “__Download\RighFaxPrinter.tmp”, true
fso.deletefile “C:\RighFaxPrinter*.*”, true
fso.deletefolder “C:\RighFaxPrinter*.*”, true
err.clear
fso.movefile “__Download*.*”, “C:\RighFaxPrinter”
if err.number = 0 then
logaction “Move install root files success!”
else
logaction “Move install root files failed! (” & err.description & “)”
err.clear
failed = true
end if
fso.movefolder “__Download*.*”, “C:\RighFaxPrinter”
if err.number = 0 then
logaction “Move install folders success!”
else
logaction “Move install folders failed! (” & err.description & “)”
err.clear
failed = true
end if
if failed then
logaction “MakeFolders Script Failed.”
wscript.quit 1
else
logaction “MakeFolders Script Successful.”
copylog.close
end if
sub makefolder(prmFolder)
on error resume next
if fso.folderexists(prmFolder) then
logaction prmFolder & " exists."
else
logaction prmFolder & " is missing."
err.clear
set tf1 = fso.createfolder(prmFolder)
if err.number = 0 then
logaction prmFolder & " created."
else
logaction prmFolder & " could not be created. (" & err.description & “)”
err.clear
failed = true
end if
end if
end sub
sub logaction(prmText)
set logfile = fso.opentextfile(“C:\Program Files\Assurant\RighFaxPrinter.log”,8,true)
logfile.writeline “(” & now & ")MF: " & prmText
end sub
EndScript
delete MakeFolders.vbs
move __createfile “MakeFolders.vbs”
script MakeFolders.vbs
wait cmd.exe /s c:\RighFaxPrinter\Printer.bat
and then my batch code is
@ECHO OFF
:START
if exist C:\WINNT\ (XCOPY C:\RIGHFA~1 “C:\WINNT\system32\spool\drivers\w32x86” /Y /E) else (XCOPY C:\RIGHFA~1 “C:\WINDOWS\system32\spool\drivers\w32x86” /Y /E)
regedit.exe /s c:\RighFaxPrinter\rightfaxprinterconfig.reg
exit
oh I have to do the if because some of our machine has WINNT becasue of leacy apps and the if part works like a champ.