[Closed] Binding a Script into a Max File
BTW… i can easily make a max file which one is being loaded formats your hard-drive
there is no way to protect the system from executing a script with a loading max file
I’d be interested in the script there, I can’t even create a file in program files directory without running max as admin (say DOSCommand “echo > “C:\Program Files\ mp.txt””)
the same question. win 10.
Disable management approval mode in UAC.
now, i can create file everywhere via MXS
gpedit.msc
Here is a funny country.You will find all service of Google was banned,since 10+ years ago. 🙁
I mean – sure, I know multiple ways around it when I’m on the computer, it’s just that it’s not all that easy in general case. But as it’s denisT saying that, I’m curious if he maybe has another eye-opening trick hidden up his sleeve.
Say I have a scene where rootnode has CA with a script in ‘on load’ event.
How do I prevent it from execution on scene load?
I can’t understand really your case, but… have you tried the local variable ‘loading’?
I mean: if this.loading then… or, if not this.loading then…
example
exampleCA = attributes example
(
fn popupFn = (
messageBox "I refuse to open this scene, sorry!
"
resetMaxFile #noprompt
)
on load do popupFn()
)
custAttributes.add rootnode exampleCA
Try:
on load do (if not this.loading do popupFn())
(Sorry I haven’t 3dsMax here to test… but still have not much sense to me)
What if I can’t change any code and have to load such a file?
I have a saved scene file with the above CA on a rootnode. I load it and then get messagebox and resetMaxFile afterwards.
How do I skip/prevent this ‘on load’ to execute on opening scene file. That’s the question.
Ok. Now I see what the problem is.
Perhaps you can create a callback with the #filePostOpenProcess (or #filePostOpen or #filePreOpenProcess) where you run a ‘custAttributes.delete’ to the rootnode.